-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
95 lines (90 loc) · 3.1 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
services:
postgres:
image: postgis/postgis:14-3.2
environment:
POSTGRES_PASSWORD: insecure-postgres-kobo-dev
volumes:
- ./storage/postgres:/var/lib/postgresql/data
# Used to create two databases; see
# https://github.com/docker-library/docs/tree/b56d2dd13bee760cb7a569969f0f7d0c71e1f637/postgres#initialization-scripts
- ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
networks:
default:
ipv4_address: 10.6.6.6
ports:
- 10.6.6.1:60666:5432
redis:
image: redis
volumes:
- ./storage/redis:/data
command: --requirepass insecure-redis-kobo-dev
networks:
default:
ipv4_address: 10.6.6.7
ports:
- 10.6.6.1:60667:6379
mongo:
image: mongo:5.0.8
environment:
# HELLO: the root user only gets created in the `admin` database and
# cannot authenticate to other databases like `formhub`
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: insecure-mongo-kobo-dev
MONGO_INITDB_DATABASE: formhub
volumes:
- ./storage/mongo:/data/db
# Used to grant access to `formhub` database by user `kobo`
# with password `insecure-mongo-kobo-dev`
- ./mongo/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
networks:
default:
ipv4_address: 10.6.6.8
ports:
- 10.6.6.1:60668:27017
enketo:
image: kobotoolbox/enketo-express-extra-widgets:6.2.2
depends_on:
- redis
volumes:
- ./enketo/config.json:/srv/src/enketo_express/config/config.json
ports:
- "10.6.6.1:9002:8005"
networks:
default:
ipv4_address: 10.6.6.9
# pm2 doesn't have an explicit handler for SIGTERM and therefore doesn't
# die when it's running as PID 1. `init: true` causes `tini`-based
# `docker-init` to be used as PID 1 inside the container
# (remove after https://github.com/enketo/enketo-express/pull/571)
init: true
# In the future, we may use environment variables for configuration
# instead of `config.json`. But not right now :)
#
# # Bypass the default command, which requires a `config.json`
# command: node app.js
# environment:
# ENKETO_PORT: 60669
# # Enketo does not seem to respect the database number
# ENKETO_REDIS_MAIN_URL: "redis://:[email protected]:60667/20"
# ENKETO_REDIS_CACHE_URL: "redis://:[email protected]:60667/21"
# ENKETO_LINKED_FORM_AND_DATA_SERVER_API_KEY: insecure-enketo-kobo-dev
# ENKETO_LINKED_FORM_AND_DATA_SERVER_AUTHENTICATION_ALLOW_INSECURE_TRANSPORT: "true"
# ENKETO_MAX_PROCESSES: 2
# # This looks like it doesn't work at all
# ENKETO_IP_FILTERING_ALLOWPRIVATEIPADDRESS: "true"
nginx:
image: nginx
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./storage/kobocat/media:/mnt/kobocat/media
- ./storage/kpi/media/__public:/mnt/kpi/media/__public
ports:
- "10.6.6.1:9000:9000"
- "10.6.6.1:9001:9001"
networks:
default:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.6.6.0/24