-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
52 lines (47 loc) · 1.14 KB
/
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"
volumes:
mysql_data: {}
services:
db:
container_name: mysqldb
image: mysql:latest
env_file :
- ./letterman-back/backend/devenvs/mysqldb.env
volumes:
- mysql_data:/var/lib/mysql
ports:
- "3306:3306"
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
timeout: 20s
retries: 10
networks:
- letterman
backend:
build: ./letterman-back
command: >
bash -c "python3 manage.py makemigrations &&
python3 manage.py migrate &&
python3 manage.py runserver 0.0.0.0:8080"
ports:
- "8080:8080"
volumes:
- ./backend:/app
frontend:
build:
context: ./letterman-front
dockerfile: Dockerfile
command: [ "yarn", "start" ]
container_name: frontend
environment:
- REACT_APP_BACKEND_URL=http://localhost:8080
volumes:
- ./letterman-front:/frontend
- ./letterman-front/node_modules/:/frontend/node_modules
ports:
- "3000:3000"
restart: always
tty: true