-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose.yml
135 lines (129 loc) · 3.64 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
version: "2.2"
services:
backend:
build:
context: .
dockerfile: ocd_backend/Dockerfile
# cache_from:
#- openstatefoundation/open-raadsinformatie-backend:build-tmp
#image: ghcr.io/openstate/open-raadsinformatie
environment:
- BUGSNAG_APIKEY="df52aa68d1fa14338e2a11886c0d1c36"
- SENTRY_DSN=https://6476b737f5e580063d37a6f186355850@o4505233371103232.ingest.us.sentry.io/4507464171061248
networks:
- ori
volumes:
- oridata:/opt/ori/data
- .:/opt/ori
- ./ocd_backend:/opt/ori/ocd_backend
depends_on:
elastic:
condition: service_healthy
postgres:
condition: service_started
#mem_limit: 1g
loader:
build:
context: .
dockerfile: ocd_backend/Dockerfile
# cache_from:
#- openstatefoundation/open-raadsinformatie-backend:build-tmp
#image: ghcr.io/openstate/open-raadsinformatie
environment:
- BUGSNAG_APIKEY="df52aa68d1fa14338e2a11886c0d1c36"
- SENTRY_DSN=https://6476b737f5e580063d37a6f186355850@o4505233371103232.ingest.us.sentry.io/4507464171061248
networks:
- ori
volumes:
- oridata:/opt/ori/data
#- .:/opt/ori
- ./ocd_backend:/opt/ori/ocd_backend
depends_on:
elastic:
condition: service_healthy
postgres:
condition: service_started
command: celery --app=ocd_backend.app:celery_app worker --loglevel=info -Q loaders --concurrency=1 --without-gossip --quiet
#mem_limit: 1g
redis:
image: "redis:${REDIS_VERSION}"
networks:
- ori
volumes:
- redisdata:/data
sysctls:
- net.core.somaxconn=65535
command: ["redis-server", "--appendonly", "no", "--save", "\"\""]
#mem_limit: 1g
restart: always
elastic:
image: elasticsearch:7.9.3
ulimits:
memlock:
soft: -1
hard: -1
#mem_limit: 1g
cap_add:
- IPC_LOCK
networks:
- ori
- nginx-load-balancer
volumes:
- esdata:/usr/share/elasticsearch/data
healthcheck:
test: curl -s http://127.0.0.1:9200/_cat/health
interval: 15s
timeout: 10s
retries: 5
restart: always
environment:
- "ES_JAVA_OPTS=-Xms16g -Xmx16g"
# Discovery
- network.host=127.0.0.1
- http.host=0.0.0.0
- cluster.name=docker-cluster
# Disable xpack features
- xpack.security.enabled=false
#- xpack.monitoring.enabled=false
- xpack.monitoring.collection.enabled=false
# Enable CORS for all origins
#- http.cors.enabled=true
#- http.cors.allow-origin="*"
#- http.cors.allow-headers=Content-Type,Content-Length,Authorization
#- http.cors.allow-credentials=true
# Security (https://www.elastic.co/blog/found-elasticsearch-security)
- rest.action.multi.allow_explicit_index=false
#- script.allowed_types=none
- script.allowed_contexts=ingest
# Other settings
- node.max_local_storage_nodes=20
- bootstrap.memory_lock=true
- reindex.remote.whitelist=c-open-raadsinformatie:9200
# elastic2:
# extends:
# service: elastic
# environment:
# - cluster.name=docker-cluster2
# - reindex.remote.whitelist=elastic:9200
postgres:
image: "postgres:${POSTGRES_VERSION}"
#command: -c config_file=/etc/postgresql.conf
networks:
- ori
volumes:
# - ./postgresql.conf:/etc/postgresql.conf
- pgdata:/var/lib/postgresql/data
volumes:
esdata:
driver: local
redisdata:
driver: local
oridata:
driver: local
pgdata:
driver: local
networks:
ori:
nginx-load-balancer:
external:
name: docker_nginx-load-balancer