-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
44 lines (41 loc) · 1017 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
version: '3'
services:
backend:
container_name: backend-opener
image: backend-opener
build: ./backend
hostname: backend
command: >
sh -c "python manage.py migrate --noinput
&& python manage.py initadmin
&& python manage.py runserver
0.0.0.0:${DOCKER_BACKEND_PORT}"
ports:
- "${DOCKER_BACKEND_PORT}:${DOCKER_BACKEND_PORT}"
volumes:
- ./backend:/app
restart: on-failure
environment:
- DJANGO_SETTINGS_MODULE=opener.settings
env_file:
- .env
frontend:
container_name: frontend-opener
image: frontend-opener
hostname: frontend
command: sh -c "HOST=0.0.0.0 PORT=${DOCKER_FRONTEND_PORT} npm start"
build:
context: ./frontend
dockerfile: ./Dockerfile
ports:
- "${DOCKER_FRONTEND_PORT}:${DOCKER_FRONTEND_PORT}"
volumes:
- "./frontend:/app"
env_file:
- .env
mock-api:
build: json-mock-api/.
volumes:
- ./json-mock-api:/app
ports:
- "3001:3000"