-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (48 loc) · 1.07 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.8"
services:
database:
container_name: database-app
restart: always
build:
context: ./sql
dockerfile: ../docker/mysql/Dockerfile
ports:
- "${DB_PORT:-3306}:3306"
volumes:
- ./sql/db-init:/docker-entrypoint-initdb.d
env_file:
- .env
networks:
- hh-net
backend:
container_name: backend-app
restart: always
build:
context: ./backend
dockerfile: ../docker/django/Dockerfile
env_file:
- .env
command: ["./wait.sh", "${DB_HOST:-database}:${MYSQL_PORT:-3306}", "--timeout=30", "--", "python", "manage.py", "runserver", "0.0.0.0:8000"]
ports:
- "${BACKEND_PORT:-8001}:8000"
depends_on:
- database
links:
- database
networks:
- hh-net
frontend:
container_name: frontend-app
restart: always
env_file:
- ./frontend/.env
build:
context: ./frontend
dockerfile: ../docker/react/Dockerfile
ports:
- "${HOST_PORT:-3000}:3000"
networks:
- hh-net
networks:
hh-net:
driver: bridge