-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (47 loc) · 1.35 KB
/
docker-compose.yml
File metadata and controls
51 lines (47 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
version: '3.8'
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-ops_user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-ops_password}
POSTGRES_DB: ${POSTGRES_DB:-ops_sentinel}
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-ops_user}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
backend:
build: ./backend
ports:
- "3001:3001"
environment:
- PORT=3001
- GITHUB_WEBHOOK_SECRET=${GITHUB_WEBHOOK_SECRET}
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID}
- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET}
- FRONTEND_URL=${FRONTEND_URL:-http://localhost}
- DATABASE_URL=postgresql://${POSTGRES_USER:-ops_user}:${POSTGRES_PASSWORD:-ops_password}@postgres:5432/${POSTGRES_DB:-ops_sentinel}
- RETENTION_DAYS=${RETENTION_DAYS:-30}
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
frontend:
build:
context: ./frontend
args:
- VITE_API_URL=${VITE_API_URL:-http://localhost:3001}
- VITE_GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID}
ports:
- "80:80"
depends_on:
- backend
restart: unless-stopped
volumes:
postgres-data: