-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (46 loc) · 1.07 KB
/
docker-compose.yml
File metadata and controls
49 lines (46 loc) · 1.07 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
services:
db:
image: mysql:8.0
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
ports:
- "3307:3306"
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
backend:
build: .
restart: unless-stopped
ports:
- "8000:8000"
environment:
DB_URI: mysql+pymysql://root:${MYSQL_ROOT_PASSWORD}@db:3306/${MYSQL_DATABASE}
JWT_SECRET_KEY: ${JWT_SECRET_KEY}
JWT_ALGORITHM: HS256
JWT_EXPIRE_MINUTES: 30
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS}
COOKIE_SECURE: ${COOKIE_SECURE}
volumes:
- uploaded_images:/app/static/images
depends_on:
db:
condition: service_healthy
frontend:
build:
context: ./frontend
args:
VITE_API_URL: ${VITE_API_URL}
restart: unless-stopped
ports:
- "80:80"
depends_on:
- backend
volumes:
mysql_data:
uploaded_images: