-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
93 lines (88 loc) · 2.81 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
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
87
88
89
90
91
92
93
version: '3.7'
services:
traefik:
image: traefik:v1.7.33-alpine
command:
- --api
- --docker
- --docker.domain=localhost
- --docker.exposedbydefault=false
labels:
- traefik.enable=true
- traefik.port=8080
- traefik.frontend.rule=Host:traefik.localhost
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
network_mode: "host"
db:
image: postgres:14
environment:
- POSTGRES_HOST=localhost
- POSTGRES_USER=django
- POSTGRES_PASSWORD=django
- POSTGRES_DB=mds
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- pg_data:/var/lib/postgresql/data/pgdata
expose:
- "5432"
networks:
services-network:
aliases:
- db
backend:
image: ferjavrec/mds-backend:1.0
environment:
SECRET_KEY: xfsdff9fd8sf8dsf9sf
DJANGO_SUPERUSER_USERNAME: admin
DJANGO_SUPERUSER_EMAIL: admin
DJANGO_SUPERUSER_PASSWORD: admin
DATABASE_HOST: db
DATABASE_NAME: mds
DATABASE_USER: django
DATABASE_PASS: django
PRUEBA: "True"
DEBUG: "True"
DRF_RECAPTCHA_SECRET_KEY: 6LeTTegkAAAAAMjb-jfzfi9ejAahNUSCf9U8E6JA
URL_FRONT: 127.0.0.1
NOMBRE_SITIO: Ministerio de desarrollo social
volumes:
- static_volume:/app/api/mds_convenios_obras/mds_convenios_obras/static
- media_volume:/app/api/mds_convenios_obras/mds_convenios_obras/media
labels:
- traefik.enable=true
- traefik.frontend.port=8000
- traefik.frontend.rule=HostRegexp:mds-backend.localhost,{subdomain:[a-z0-9-_]+}.mds-backend.localhost
- traefik.backend.loadbalancer.stickiness=true
- traefik.backend.loadbalancer.method=drr
ports:
- "8000:8000"
depends_on:
- db
networks:
services-network:
aliases:
- backend
frontend:
image: ferjavrec/mds-frontend:1.0
volumes:
- react_volume:/app/build
labels:
- traefik.enable=true
- traefik.frontend.port=80
- traefik.frontend.rule=HostRegexp:mds.localhost,{subdomain:[a-z0-9-_]+}.mds.localhost
- traefik.backend.loadbalancer.stickiness=true
- traefik.backend.loadbalancer.method=drr
networks:
services-network:
aliases:
- frontend
volumes:
pg_data:
static_volume:
media_volume:
react_volume:
networks:
services-network:
name: services-network
driver: bridge