-
Notifications
You must be signed in to change notification settings - Fork 207
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
154 lines (146 loc) · 3.52 KB
/
docker-compose.prod.yml
File metadata and controls
154 lines (146 loc) · 3.52 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
services:
db:
image: postgres:18
container_name: postgres__open-wearables
environment:
POSTGRES_DB: open-wearables
POSTGRES_USER: open-wearables
POSTGRES_PASSWORD: open-wearables
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U open-wearables -d open-wearables"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- postgres_data:/var/lib/postgresql
restart: unless-stopped
app:
build:
context: ./backend
dockerfile: Dockerfile
container_name: backend__open-wearables
image: open-wearables-platform:latest
pull_policy: never
command: scripts/start/app.sh
env_file:
- ./backend/config/.env
environment:
- DB_HOST=db
- REDIS_HOST=redis
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
restart: unless-stopped
celery-worker:
container_name: celery-worker__open-wearables
image: open-wearables-platform:latest
pull_policy: never
command: scripts/start/worker.sh
env_file:
- ./backend/config/.env
environment:
- DB_HOST=db
- REDIS_HOST=redis
depends_on:
- redis
- db
- app
restart: unless-stopped
celery-beat:
container_name: celery-beat__open-wearables
image: open-wearables-platform:latest
pull_policy: never
command: scripts/start/beat.sh
env_file:
- ./backend/config/.env
environment:
- DB_HOST=db
- REDIS_HOST=redis
depends_on:
- redis
- db
- app
restart: unless-stopped
flower:
container_name: flower__open-wearables
image: open-wearables-platform:latest
pull_policy: never
command: scripts/start/flower.sh
env_file:
- ./backend/config/.env
environment:
- DB_HOST=db
- REDIS_HOST=redis
ports:
- 5555:5555
depends_on:
- redis
- db
- app
restart: unless-stopped
redis:
container_name: redis__open-wearables
image: redis:8
ports:
- "6379:6379"
volumes:
- redis_data:/var/lib/redis/data
restart: unless-stopped
svix-server:
container_name: svix-server__open-wearables
image: svix/svix-server:v1
entrypoint:
- sh
- -c
- |
: "$${SVIX_JWT_SECRET:=$$SECRET_KEY}"
export SVIX_JWT_SECRET
exec svix-server "$$@"
- --
command: ["--run-migrations"]
env_file:
- ./backend/config/.env
environment:
SVIX_DB_DSN: "postgresql://${DB_USER:-open-wearables}:${DB_PASSWORD:-open-wearables}@${DB_HOST:-db}:${DB_PORT:-5432}/svix"
SVIX_QUEUE_TYPE: "redis"
SVIX_REDIS_DSN: "redis://redis:6379/1"
SVIX_CACHE_TYPE: "redis"
expose:
- "8071"
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
app:
condition: service_started
healthcheck:
test: ["CMD", "svix-server", "healthcheck", "http://localhost:8071"]
interval: 5s
timeout: 3s
retries: 20
start_period: 10s
restart: unless-stopped
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
VITE_API_URL: ${VITE_API_URL:?Set VITE_API_URL in your environment}
container_name: frontend__open-wearables
image: open-wearables-frontend:latest
pull_policy: never
ports:
- "3000:3000"
depends_on:
- app
restart: unless-stopped
volumes:
postgres_data:
redis_data: