-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
58 lines (57 loc) · 1.43 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
services:
db:
image: postgres
container_name: postgresql-docker
restart: on-failure
command: -p ${POSTGRES_HOST_PORT}
networks:
- database-network
volumes:
- ./postgres_data:/var/lib/postgresql/data
ports:
- ${POSTGRES_HOST_PORT}:${POSTGRES_HOST_PORT}
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
backend:
build:
context: backend
dockerfile: Dockerfile
container_name: django-docker
restart: on-failure
networks:
- database-network
command: python manage.py runserver 0.0.0.0:${BACKEND_PORT}
volumes:
- ./backend:/code
ports:
- ${BACKEND_PORT}:${BACKEND_PORT}
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_HOST_PORT=${POSTGRES_HOST_PORT}
- BACKEND_PORT=${BACKEND_PORT}
- INTRA_UID=${INTRA_UID}
- INTRA_SECRET=${INTRA_SECRET}
depends_on:
- db
frontend:
build:
context: frontend
dockerfile: Dockerfile
container_name: react-docker
restart: on-failure
volumes:
- ./frontend:/app
ports:
- ${FRONTEND_PORT}:${FRONTEND_PORT}
environment:
- BACKEND_PORT=${BACKEND_PORT}
- PORT=${FRONTEND_PORT}
depends_on:
- backend
networks:
database-network:
driver: bridge