forked from comses/comses.net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdc-dev.yml
77 lines (77 loc) · 2.09 KB
/
dc-dev.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
version: '3'
services:
redis:
image: redis:6-alpine
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
volumes:
- ./deploy/conf/redis.conf:/usr/local/etc/redis/redis.conf
- ./docker/shared/redis:/data
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:${ES_VERSION}
ports:
- "127.0.0.1:9200:9200"
environment:
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
deploy:
resources:
limits:
memory: 1g
cap_add:
- IPC_LOCK
volumes:
- ./deploy/elasticsearch.conf.d/log4j2.properties:/usr/share/elasticsearch/config/log4j2.properties
- ./deploy/elasticsearch.conf.d/elasticsearch-primary.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- esdata:/usr/share/elasticsearch/data
${DB_HOST}:
image: postgis/postgis:10-3.1
volumes:
- ./docker/shared/pgdata:/var/lib/postgresql/data
environment:
# FIXME: replace with init sql script, see https://github.com/docker/docker/issues/13490
POSTGRES_USER: "${DB_USER}"
POSTGRES_PASSWORD: "${DB_PASSWORD}"
POSTGRES_DB: "${DB_NAME}"
js:
build: frontend
image: comses/cmsjs:dev
ports:
- "127.0.0.1:3000:3000"
volumes:
- ./frontend:/code
- /code/node_modules
- ./docker/shared:/shared
- ./deploy/conf/config.ini:/secrets/config.ini
cms:
build: django
image: comses/cms:dev
volumes:
- ./django:/code
- ./docs:/docs
- ./deploy/conf/config.ini:/secrets/config.ini
- ./deploy/elasticsearch.conf.d:/etc/elasticsearch
- ./docker/shared:/shared
depends_on:
- ${DB_HOST}
- js
- elasticsearch
- redis
environment:
DJANGO_SETTINGS_MODULE: "core.settings.dev"
DB_USER: ${DB_USER}
DB_HOST: ${DB_HOST}
DB_NAME: ${DB_NAME}
DB_PORT: ${DB_PORT}
CLEAN_DATABASE: "false"
ports:
- "127.0.0.1:8000:8000"
volumes:
esdata:
driver: local