-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
72 lines (64 loc) · 1.89 KB
/
compose.yaml
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
61
62
63
64
65
66
67
68
69
70
71
72
# Production environment
services:
gateway:
image: caddy:2-alpine
volumes: [caddy_data:/data, caddy_config:/config]
ports: [80:80, 443:443]
configs: [{ source: caddy, target: /etc/caddy/Caddyfile }]
restart: unless-stopped
web:
image: ghcr.io/clayenkitten/itam-edu-web:latest
build: &build
dockerfile: ./packages/web/Dockerfile
context: .
depends_on: [api]
expose: [3000]
env_file: ./packages/web/.env
environment: { ITAM_EDU_WEB_PORT: "3000" }
restart: unless-stopped
api:
image: ghcr.io/clayenkitten/itam-edu-api:latest
build: { <<: *build, dockerfile: ./packages/api/Dockerfile }
depends_on: { db-migration: { condition: service_completed_successfully } }
expose: [3000]
env_file: ./packages/api/.env
environment: { ITAM_EDU_API_PORT: "3000" }
restart: unless-stopped
tg:
image: ghcr.io/clayenkitten/itam-edu-tg:latest
build: { <<: *build, dockerfile: ./packages/tg/Dockerfile }
depends_on: [api]
expose: [3000]
env_file: ./packages/tg/.env
environment: { ITAM_EDU_TG_WEBHOOK_PORT: "3000" }
restart: unless-stopped
db-migration:
image: ghcr.io/clayenkitten/itam-edu-db:latest
build: ./packages/db
depends_on: { postgres: { condition: service_healthy } }
env_file: ./packages/db/.env
deploy:
restart_policy:
condition: on-failure
max_attempts: 3
postgres:
image: postgres:17
expose: [5432]
ports: [127.0.0.1:5432:5432]
shm_size: 128mb
restart: unless-stopped
volumes: [postgres:/var/lib/postgresql/data]
env_file: ./packages/db/.env
healthcheck:
test: pg_isready --dbname="$$POSTGRES_DB" --username="$$POSTGRES_USER"
interval: 5s
timeout: 60s
retries: 5
start_period: 30s
start_interval: 500ms
configs:
caddy: { file: ./Caddyfile }
volumes:
postgres:
caddy_data:
caddy_config: