-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (51 loc) · 1.17 KB
/
docker-compose.yml
File metadata and controls
59 lines (51 loc) · 1.17 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
services:
backend:
build: ./backend
command: poetry run uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload --no-access-log
volumes:
- ./backend:/code
- /code/.venv
ports:
- "8000:8000"
env_file:
- ./backend/.env
environment:
- DATABASE_URL=mysql+pymysql://root:root@mysql-db:3306/marketplace
depends_on:
mysql-db:
condition: service_healthy
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "5173:5173"
volumes:
- /app/node_modules
- ./frontend:/app
env_file:
- ./frontend/.env
command: ["npm", "run", "dev", "--", "--host"]
depends_on:
- backend
mysql-db:
image: mysql:8.0
restart: always
env_file:
- ./backend/.env
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: marketplace
ports:
- "3307:3306"
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-proot" ]
timeout: 20s
retries: 2
interval: 15s
start_period: 30s
command: --max_connections=500
volumes:
mysql_data: