-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (54 loc) · 1.48 KB
/
docker-compose.yml
File metadata and controls
58 lines (54 loc) · 1.48 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
52
53
54
55
56
57
58
services:
db:
image: postgres:15-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-gitlab_analyzer}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
backend:
build: ./backend
extra_hosts:
- "host.docker.internal:host-gateway"
dns:
- ${DNS:-8.8.8.8}
environment:
DATABASE_URL: ${DATABASE_URL:-postgresql+asyncpg://postgres:postgres@db:5432/gitlab_analyzer}
REDIS_URL: ${REDIS_URL:-redis://redis:6379/0}
GITLAB_URL: ${GITLAB_URL}
GITLAB_TOKEN: ${GITLAB_TOKEN}
LOG_LEVEL: ${LOG_LEVEL:-INFO}
CORS_ORIGINS: '["http://localhost:${FRONTEND_PORT:-3000}"]'
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health')\""]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
frontend:
build: ./frontend
ports:
- "${FRONTEND_PORT:-3000}:80"
depends_on:
backend:
condition: service_healthy
volumes:
postgres_data: