forked from publicissapient-france/e-footprint-interface
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
115 lines (112 loc) · 2.82 KB
/
docker-compose.yml
File metadata and controls
115 lines (112 loc) · 2.82 KB
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: "efootprint"
# Services
services:
traefik:
hostname: traefik
restart: unless-stopped
image: traefik:latest
container_name: etraefik
networks:
- traefik
healthcheck:
test: ["CMD", "traefik", "healthcheck", "--ping"]
interval: 10s
timeout: 1s
retries: 3
start_period: 10s
ports:
- 127.0.0.1:80:80
- 127.0.0.1:443:443
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./docker/conf/ssl:/etc/certs:ro
- ./docker/conf/traefik.dyn.yml:/etc/traefik/dyn.yml:ro
- ./docker/conf/traefik.yml:/etc/traefik/traefik.yml:ro
- ./docker/conf/acme.json:/acme.json
profiles:
- dev
- alpha
web:
hostname: web
restart: on-failure
build:
dockerfile: Dockerfile-dev
context: ${EF_APP_PATH}
ports:
- 80
env_file: ${EF_APP_PATH}/.env
environment:
- DJANGO_DOCKER=True
command: /usr/local/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf -n
volumes:
- ${EF_APP_PATH}:/app:cached
- type: bind
source: ${EF_APP_PATH}/docker/conf/supervisord.conf
target: /etc/supervisor/conf.d/supervisord.conf
labels:
- traefik.enable=true
- traefik.http.routers.efootprint.rule=Host(`efootprint.boavizta.dev`)
- traefik.http.routers.efootprint.tls=true
- traefik.http.services.efootprint.loadbalancer.server.port=8000
- traefik.http.services.efootprint.loadbalancer.passhostheader=true
networks:
- traefik
depends_on:
- traefik
- postgres
- redis
profiles:
- dev
- alpha
redis:
image: redis:latest
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
networks:
- traefik
profiles:
- dev
- alpha
postgres:
image: postgres:latest
restart: "on-failure"
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U root -d efootprint'"]
interval: 10s
timeout: 3s
retries: 3
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: kakoukakou
POSTGRES_DB: efootprint
ports:
- "5432:5432"
labels:
- "traefik.enable=true"
- "traefik.tcp.routers.postgres.rule=HostSNI(`*`)"
- "traefik.tcp.routers.postgres.entrypoints=postgres"
- "traefik.tcp.routers.postgres.tls=false"
- "traefik.tcp.services.postgres.loadbalancer.server.port=5432"
networks:
- traefik
volumes:
- pgdata01:/var/lib/postgresql/data
- ./conf/postgresql/init.sql:/docker-entrypoint-initdb.d/dump.sql
depends_on:
- traefik
profiles:
- dev
- alpha
# Volumes
volumes:
pgdata01:
driver: local
# Nets
networks:
traefik:
external: false