-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
119 lines (115 loc) · 3.09 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
version: '3'
services:
web:
container_name: protectedplanet-web
build: .
command: /bin/bash -l -c "rm -rf /ProtectedPlanet/tmp/pids/server.pid; bundle exec rails s -p 3000 -b '0.0.0.0'"
volumes:
- .:/ProtectedPlanet
- protectedplanet_node_modules:/ProtectedPlanet/node_modules
- protectedplanet_import_data:/import_data
- protectedplanet_bundler:/usr/local/bundle
- ${SSH_AUTH_SOCK}:${SSH_AUTH_SOCK}
network_mode: host
environment:
- SSH_AUTH_SOCK=${SSH_AUTH_SOCK}
env_file:
- '.env'
depends_on:
- db
- redis
- elasticsearch
- webpacker
stdin_open: true
tty: true
db:
container_name: protectedplanet-db
image: kartoza/postgis:11.5-2.5
network_mode: host
env_file:
- '.env'
volumes:
- protectedplanet_pg_data:/var/lib/postgresql
- ./entrypoints/init.sql:/docker-entrypoint-initdb.d/init.sql
redis:
container_name: protectedplanet-redis
image: redis
network_mode: host
env_file:
- '.env'
volumes:
- protectedplanet_redis_data:/data
sidekiq:
build: .
volumes:
- .:/ProtectedPlanet
- protectedplanet_node_modules:/ProtectedPlanet/node_modules
- protectedplanet_import_data:/import_data
network_mode: host
depends_on:
- db
- redis
command: /bin/bash -l -c "bundle exec sidekiq"
env_file:
- '.env'
stdin_open: true
tty: true
elasticsearch:
container_name: protectedplanet-elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:8.6.0
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
network_mode: host
env_file:
- '.env'
volumes:
- 'protectedplanet_es_data:/usr/share/elasticsearch/data'
kibana:
image: docker.elastic.co/kibana/kibana:8.6.0
environment:
- ELASTICSEARCH_HOSTS=http://localhost:9200
env_file:
- '.env'
network_mode: host
webpacker:
container_name: protectedplanet-webpacker
build: .
env_file:
- '.env'
command: /bin/bash -l -c "rm -rf /ProtectedPlanet/app/public/packs; rm -rf /ProtectedPlanet/tmp/cache/webpacker; /ProtectedPlanet/docker/scripts/webpacker"
volumes:
- .:/ProtectedPlanet
- protectedplanet_node_modules:/ProtectedPlanet/node_modules
- protectedplanet_bundler:/usr/local/bundle
network_mode: host
api:
container_name: protectedplanet-api
build:
context: ${API_PATH}
command: /bin/bash -l -c "bundle exec rackup"
volumes:
- ${API_PATH}:/ProtectedPlanetApi
- ${SSH_AUTH_SOCK}:${SSH_AUTH_SOCK}
network_mode: host
environment:
- SSH_AUTH_SOCK=${SSH_AUTH_SOCK}
env_file:
- ${API_PATH}/.env
depends_on:
- db
stdin_open: true
tty: true
profiles: ['api']
volumes:
protectedplanet_pg_data:
protectedplanet_redis_data:
protectedplanet_import_data:
protectedplanet_es_data:
protectedplanet_bundler:
protectedplanet_node_modules: