-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (46 loc) · 1.05 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
version: "3"
services:
django:
build:
context: .
container_name: django
command: bash -c "python manage.py makemigrations && python manage.py migrate && python manage.py collectstatic --no-input && gunicorn config.wsgi:application --bind 0.0.0.0:8000"
ports:
- "8000:8000"
volumes:
- ./src:/var/www/html
depends_on:
- postgres
networks:
- app-network
nginx:
build:
context: ./Docker/nginx
container_name: nginx
tty: true
ports:
- "80:80"
depends_on:
- django
volumes:
- ./src:/var/www/html
networks:
- app-network
postgres:
image: postgres:latest
container_name: postgres
restart: unless-stopped
tty: true
ports:
- "5432:5432"
environment:
POSTGRES_DB: canalservice
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- ./data/db:/var/lib/postgresql/data
networks:
- app-network
networks:
app-network:
driver: bridge