This repository has been archived by the owner on Apr 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
executable file
·181 lines (172 loc) · 5.04 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
version: '2.4'
services:
nginx:
image: nginx:1.17.10
restart: unless-stopped
ports:
- '80:80'
- '443:443'
cpus: 0.50
mem_limit: 300M
volumes:
- './nginx/production.conf:/etc/nginx/conf.d/default.conf'
- './nginx/.htpasswd:/etc/nginx/.htpasswd'
- './nginx/dhparam.pem:/etc/nginx/ssl/dhparam.pem'
- './nginx/zen.crt:/etc/nginx/ssl/zen.crt'
- './nginx/entrust-zen.pole-emploi.fr-key.pem:/etc/nginx/ssl/entrust-zen.pole-emploi.fr-key.pem'
- './back/extracts:/home/extracts'
- './front:/home/front'
- './front-admin:/home/front-admin'
- './nginx/var/log/nginx:/var/log/nginx'
environment:
- TZ=Europe/Paris
networks:
actualisation_network:
ipv4_address: 172.0.0.10
node:
restart: unless-stopped
build:
context: .
dockerfile: dockerfile_back
cpus: 2.5
mem_limit: 4G
volumes:
- './back:/home/back'
- './back/var/log/zen_node:/var/log/zen_node'
expose:
- '8080'
- '8081'
networks:
actualisation_network:
ipv4_address: 172.0.0.100
depends_on:
- 'db'
environment:
- DATABASE_URL=${DATABASE_URL}
- CLIENT_OAUTH_ID=${CLIENT_OAUTH_ID}
- CLIENT_OAUTH_SECRET=${CLIENT_OAUTH_SECRET}
- API_HOST=${API_HOST}
- TOKEN_HOST=${TOKEN_HOST}
- APP_HOST=${APP_HOST}
- COOKIE_SECRET=${COOKIE_SECRET}
- AUTH_REDIRECT_URI=${AUTH_REDIRECT_URI}
- SENTRY_ENV=${SENTRY_ENV}
- SENTRY_URL=${SENTRY_URL}
- EMAIL_KEY=${EMAIL_KEY}
- EMAIL_KEY_SECRET=${EMAIL_KEY_SECRET}
- TZ=Europe/Paris
- SLACK_WEBHOOK_SU_ZEN=${SLACK_WEBHOOK_SU_ZEN}
- SLACK_WEBHOOK_SU_ZEN_TECH=${SLACK_WEBHOOK_SU_ZEN_TECH}
- SEND_CAMPAIGN_EMAILS=${SEND_CAMPAIGN_EMAILS}
- SEND_TRANSACTIONAL_EMAILS=${SEND_TRANSACTIONAL_EMAILS}
- AUTHORIZE_ALL_USERS=${AUTHORIZE_ALL_USERS}
- WINSTON_ENABLE_SLACK=${WINSTON_ENABLE_SLACK}
- WINSTON_ENABLE_LOG=${WINSTON_ENABLE_LOG}
- WINSTON_ENABLE_FILE=${WINSTON_ENABLE_FILE}
- WINSTON_FILE_FOLDER=/var/log/zen_node
- WINSTON_ENABLE_SENTRY=${WINSTON_ENABLE_SENTRY}
- PE_IP=${PE_IP}
front:
restart: unless-stopped
build:
context: .
dockerfile: dockerfile_front
cpus: 0.50
mem_limit: 2G
volumes:
- './front:/home/front'
expose:
- '3000'
environment:
- TZ=Europe/Paris
networks:
actualisation_network:
ipv4_address: 172.0.0.110
front-admin:
restart: unless-stopped
build:
context: .
dockerfile: dockerfile_front
cpus: 0.50
mem_limit: 2G
volumes:
- './front-admin:/home/front'
expose:
- '3000'
environment:
- TZ=Europe/Paris
networks:
actualisation_network:
ipv4_address: 172.0.0.111
db:
image: postgres:10.4
restart: always
cpus: 4.0
mem_limit: 8G
networks:
actualisation_network:
ipv4_address: 172.0.0.150
volumes:
- ./postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- TZ=Europe/Paris
command: >
postgres -c max_connections=200 -c shared_buffers=2GB -c effective_cache_size=6GB -c maintenance_work_mem=512MB -c checkpoint_completion_target=0.7 -c wal_buffers=16MB -c default_statistics_target=100 -c random_page_cost=4 -c effective_io_concurrency=2 -c work_mem=5242kB -c min_wal_size=1GB -c max_wal_size=4GB -c max_worker_processes=4 -c max_parallel_workers_per_gather=2 -c max_parallel_workers=4
db-wordpress:
image: mysql:5.7
volumes:
- ./db-wordpress-data:/var/lib/mysql
restart: always
networks:
actualisation_network:
ipv4_address: 172.0.0.160
environment:
MYSQL_ROOT_PASSWORD: ${WORDPRESS_MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${WORDPRESS_MYSQL_DATABASE}
MYSQL_USER: ${WORDPRESS_MYSQL_USER}
MYSQL_PASSWORD: ${WORDPRESS_MYSQL_PASSWORD}
wordpress:
depends_on:
- db-wordpress
image: wordpress:5.6-php8.0-apache
restart: always
networks:
actualisation_network:
ipv4_address: 172.0.0.165
environment:
WORDPRESS_DB_HOST: db-wordpress:3306
WORDPRESS_DB_NAME: ${WORDPRESS_MYSQL_DATABASE}
WORDPRESS_DB_USER: ${WORDPRESS_MYSQL_USER}
WORDPRESS_DB_PASSWORD: ${WORDPRESS_MYSQL_PASSWORD}
volumes:
- ./wordpress:/var/www/html
backups:
restart: always
hostname: backups
networks:
actualisation_network:
ipv4_address: 172.0.0.166
build:
context: .
dockerfile: dockerfile_backups
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- .:/home/docker
- ./backups:/home/backups
- /mnt:/mnt
networks:
actualisation_network:
driver: bridge
ipam:
config:
- subnet: 172.0.0.0/16
gateway: 172.0.0.1
#volumes:
#postgres-data:
#db-wordpress-data: