forked from matiasg/distribucion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
86 lines (77 loc) · 1.75 KB
/
docker-compose.yaml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: '3.4'
# necesario en web24
services:
db:
image: postgres:11.2
volumes:
- distribucion_pgdata:/var/lib/postgresql/data
networks:
- db_network
web:
image: distribucion
volumes:
- distribucion_pgdata:/var/lib/postgresql/data
- static_volume:/codigo/distribucion/static
working_dir: /codigo/distribucion
command: gunicorn --chdir /codigo/distribucion/distribucion --bind :8000 distribucion.wsgi:application
depends_on:
- db
networks:
- nginx_network
- db_network
webtest:
image: distribucion
ports:
- 8000:8000
- 8443:8443
volumes:
- static_volume:/codigo_test/distribucion/static
- ${PWD}:/codigo_test/distribucion
working_dir: /codigo_test/distribucion
command: python manage.py runserver 0.0.0.0:8000
depends_on:
- db
networks:
- db_network
bash:
image: distribucion
volumes:
- ${PWD}:/codigo_test/distribucion
working_dir: /codigo_test/distribucion
command: /bin/bash
networks:
- db_network
test:
image: distribucion
volumes:
- ${PWD}:/codigo_test/distribucion
working_dir: /codigo_test/distribucion
entrypoint: python manage.py test
networks:
- db_network
nginx:
image: nginx:1.17.2-alpine
ports:
- 8000:8000
- 8443:8443
volumes:
- ./nginx_conf:/etc/nginx/conf.d:ro
- static_volume:/codigo/distribucion/static
depends_on:
- web
networks:
- nginx_network
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
volumes:
distribucion_pgdata:
external: true
static_volume:
networks:
nginx_network:
driver: bridge
db_network:
driver: bridge