-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
78 lines (72 loc) · 2.02 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
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
version: "3.8"
services:
ffp-mysql:
container_name: ffp-mysql
build:
context: .
dockerfile: ./docker/mysql/Dockerfile
volumes:
- ffp-mysql:/var/lib/mysql
restart: unless-stopped
env_file: .env
# expose:
# - 3306
# Uncomment below to expose mysql to localhost:3308 for use with mysql workbench if needed
# ports:
# - "3308:3306"
networks:
- ffp-network
ffp-django:
container_name: ffp-django
build:
context: ./ffp-backend/
dockerfile: ../docker/django/Dockerfile
env_file: .env
restart: always
volumes:
- .:/app/
depends_on:
- ffp-mysql
working_dir: "/ffp-backend/"
expose:
- 8000
ports:
- "${HOST_API_PORT}:8000"
command: ["python", "manage.py", "runserver", "0.0.0.0:8000"]
networks:
- ffp-network
ffp-react:
container_name: ffp-react
restart: always
command : yarn start
build:
context: ./fire-react-app/
dockerfile: ../docker/react/Dockerfile
environment:
# not using .env here so that secrets aren't exposed to frontend env
# Fixes webpack problems of diff ports
# https://stackoverflow.com/a/70618837/16610401
- WDS_SOCKET_PORT=${HOST_WEB_PORT}
# This is used in the react app for routing to api from clients
- REACT_APP_DJANGO_API_URL=${DJANGO_API_URL}${DJANGO_API_ROUTE}
# - REACT_APP_DJANGO_ADMIN_URL=localhost:8000/${DJANGO_API_ROUTE}
# This adds the route as homepage
- PUBLIC_URL=${REACT_WEB_ROUTE}
- REACT_APP_WEB_ROUTE=${REACT_WEB_ROUTE}
- CHOKIDAR_USEPOLLING="true"
- WATCHPACK_POLLING=true
- FAST_REFRESH=false
ports:
- "${HOST_WEB_PORT}:3000"
stdin_open: true
# uncomment these lines to enable hot reload ;)
# volumes:
# - ./fire-react-app:/app/frontend
depends_on:
- ffp-django
volumes:
ffp-web:
ffp-mysql:
networks:
ffp-network:
driver: bridge