-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yml
98 lines (98 loc) · 3.19 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
services:
db-mongo:
# Version of mongoDB currently in production
image: mongo:4.2.23
ports:
- "${MONGODB_PORT:-27017}:27017"
volumes:
- db-mongo:/data/db
healthcheck:
test: ["CMD-SHELL", "mongo --eval 'db.runCommand({ connectionStatus: 1 })'"]
interval: 5s
timeout: 5s
retries: 5
db-postgres:
build:
dockerfile: docker-resources/postgres/Dockerfile.dev
ports:
- "${POSTGRES_PORT:-5432}:5432"
environment:
- POSTGRES_USER=${POSTGRES_ROOT_USER}
- POSTGRES_PASSWORD=${POSTGRES_ROOT_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_BAN_USER=${POSTGRES_BAN_USER}
- POSTGRES_BAN_PASSWORD=${POSTGRES_BAN_PASSWORD}
volumes:
- db-postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
redis:
# Version of Redis currently in production
image: redis:4.0.9
ports:
- "${REDIS_PORT:-6379}:6379"
api:
build:
dockerfile: docker-resources/api/Dockerfile.dev
depends_on:
db-mongo:
condition: service_healthy
db-postgres:
condition: service_healthy
redis:
condition: service_started
environment:
- MONGODB_URL=mongodb://db-mongo
- MONGODB_DBNAME=${MONGODB_DBNAME}
- POSTGRES_URL=db-postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_ROOT_USER=${POSTGRES_ROOT_USER}
- POSTGRES_ROOT_PASSWORD=${POSTGRES_ROOT_PASSWORD}
- POSTGRES_BAN_USER=${POSTGRES_BAN_USER}
- POSTGRES_BAN_PASSWORD=${POSTGRES_BAN_PASSWORD}
- REDIS_URL=redis://redis
- REDIS_MAXMEMORY=${REDIS_MAXMEMORY}
- REDIS_MAXMEMORY_POLICY=${REDIS_MAXMEMORY_POLICY}
- REDIS_MAPTILES_CACHE_DURATION=${REDIS_MAPTILES_CACHE_DURATION}
- FANTOIR_PATH=${FANTOIR_PATH}
- GAZETTEER_DB_PATH=${GAZETTEER_DB_PATH}
- CONTOURS_DATA_PATH=${CONTOURS_DATA_PATH}
- COMMUNES_LOCAUX_ADRESSES_DATA_PATH=${COMMUNES_LOCAUX_ADRESSES_DATA_PATH}
- DEPARTEMENTS=${DEPARTEMENTS}
- MAX_CONCURRENT_WORKERS=${MAX_CONCURRENT_WORKERS}
- DATAGOUV_API_KEY=${DATAGOUV_API_KEY}
- API_DEPOT_URL=${API_DEPOT_URL}
- ADMIN_TOKEN=${ADMIN_TOKEN}
- BAN_API_AUTHORIZED_TOKENS=${BAN_API_AUTHORIZED_TOKENS}
- BAN_API_URL=${BAN_API_URL}
- API_IDFIX_URL=${API_IDFIX_URL}
- API_IDFIX_TOKEN=${API_IDFIX_TOKEN}
- JOB_STATUS_LIMIT_DURATION=${JOB_STATUS_LIMIT_DURATION}
- MATOMO_URL=${MATOMO_URL}
- MATOMO_SITE_ID=${MATOMO_SITE_ID}
- MATOMO_TOKEN_AUTH=${MATOMO_TOKEN_AUTH}
- FORCE_DOWNLOAD_CONTOUR=
- FORCE_DOWNLOAD_DATASETS=
- IS_GENERATE_BANID_ON_ASSEMBLY=${IS_GENERATE_BANID_ON_ASSEMBLY}
- MIGRATION_DATA_FOLDER_PATH=${MIGRATION_DATA_FOLDER_PATH}
- TRACKING_ENABLED=${TRACKING_ENABLED}
ports:
- "${PORT:-5000}:5000"
volumes:
- data:/app/data
- dist:/app/dist
- ./lib:/app/lib
- ./scripts:/app/scripts
- ./server.js:/app/server.js
- ./worker.js:/app/worker.js
- ./toolbox.dev:/app/toolbox.dev
- ./db-migrations:/app/db-migrations
volumes:
data:
dist:
db-mongo:
db-postgres: