-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (56 loc) · 1.67 KB
/
Copy pathdocker-compose.yml
File metadata and controls
60 lines (56 loc) · 1.67 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
59
60
services:
db:
image: postgres:18.3-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-testjam}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB:-testjam}
volumes:
- postgres_data:/var/lib/postgresql
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-testjam}"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:8-alpine
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
api:
# Pin TESTJAM_VERSION in .env (default v1.0.1); avoid `latest` in prod —
# a `docker compose pull` could drag in a breaking release without warning.
image: ghcr.io/jamofer/testjam-api:${TESTJAM_VERSION:-v1.0.1}
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-testjam}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB:-testjam}
SECRET_KEY: ${SECRET_KEY}
ACCESS_TOKEN_EXPIRE_MINUTES: ${ACCESS_TOKEN_EXPIRE_MINUTES:-480}
REDIS_URL: ${REDIS_URL:-redis://redis:6379/0}
INTEGRATION_ENCRYPTION_KEY: ${INTEGRATION_ENCRYPTION_KEY}
volumes:
- uploads:/app/uploads
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "/app/scripts/healthcheck.py"]
interval: 10s
timeout: 5s
retries: 6
web:
image: ghcr.io/jamofer/testjam-web:${TESTJAM_VERSION:-v1.0.1}
ports:
- "${APP_PORT:-8080}:80"
depends_on:
- api
restart: unless-stopped
volumes:
postgres_data:
uploads: