-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (48 loc) · 1008 Bytes
/
docker-compose.yml
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
version: "3"
services:
db:
container_name: db
image: mysql:latest
volumes:
- mysql_data_dev:/var/lib/mysql
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
restart: always
ports:
- 3306:3306
backend:
container_name: backend
build: ./backend
restart: always
ports:
- 8000:8000
command: >
ash -c "python wait_for_mysql.py
&& uvicorn main:app --host 0.0.0.0 --reload"
volumes:
- ./backend/:/backend/
- ./images/:/images/
expose:
- 8000
depends_on:
- db
env_file: .env
frontend:
container_name: frontend
build:
context: ./frontend
dockerfile: Dockerfile
command: npm start
restart: always
ports:
- 3000:3000
volumes:
# - ${PWD}:/frontend
- /frontend/node_modules
- ./frontend/:/frontend/
expose:
- 3000
env_file: .env.frontend
volumes:
mysql_data_dev: null