-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yml
66 lines (53 loc) · 1.15 KB
/
docker-compose.prod.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
version: "3.4"
# CONTAINERS PRODUCTION
# TO DEPLOY:
# docker-compose -f docker-compose.prod.yml up -d
volumes:
postgres_data: {}
postgres_backup: {}
static: {}
allcode:
services:
db:
image: "postgres:latest"
container_name: postgres01
volumes:
- postgres_data:/var/lib/postgresql/data
- postgres_backup:/var/lib/postgresql/data
env_file: .env
django:
build:
context: .
dockerfile: ./docker_config/django/development/Dockerfile
container_name: dango01
volumes:
- .:/code
- /my_cdn:/my_cdn
expose:
- "8000"
entrypoint: "./docker_config/django/development/d_start.sh"
links:
- db
depends_on:
- db
env_file: .env
nginx:
build:
context: .
dockerfile: ./docker_config/nginx/Dockerfile
container_name: nginx_server
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
ports:
- "80:80"
links:
- django
volumes:
- ./docker_config/nginx/nginx.conf:/etc/nginx/nginx.conf
- .:/code
depends_on:
- django