-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
54 lines (48 loc) · 1.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
version: '3.3'
x-web: &web
build: .
image: planner-web:${CARTOWAY_VERSION:-latest}
environment:
RAILS_ENV: ${RAILS_ENV:-production}
NODE_ENV: ${NODE_ENV:-production}
GEOCODER_URL: ${GEOCODER_URL:-http://localhost:8081/0.1}
GEOCODER_API_KEY: ${GEOCODER_API_KEY:-demo}
ROUTER_URL: ${ROUTER_URL:-http://localhost:8082/0.1}
ROUTER_API_KEY: ${ROUTER_API_KEY:-demo}
OPTIMIZER_URL: ${OPTIMIZER_URL:-http://localhost:8083/0.1}
OPTIMIZER_API_KEY: ${OPTIMIZER_API_KEY:-demo}
SENTRY_DSN: ${SENTRY_DSN}
HERE_MAP_APIKEY: ${HERE_MAP_APIKEY}
volumes:
- ./config/database.yml.docker:/srv/app/config/database.yml
- ./docker/production.rb:/srv/app/config/environments/production.rb
- ./docker/production.rb:/srv/app/config/environments/development.rb
- ./docker/uploads:/srv/app/public/uploads
depends_on:
- db
- redis-cache
restart: unless-stopped
services:
db:
image: postgres:15
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- pg_data:/var/lib/postgresql/data
restart: unless-stopped
redis-cache:
image: redis:${REDIS_VERSION:-7-alpine}
restart: unless-stopped
command: redis-server --save ""
web:
<<: *web
ports:
- "${WEB_BIND:-8080}:8080" # HOST:CONTAINER, edit only HOST part
command: bash -c "LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2 bundle exec puma -v -p 8080 --pidfile 'server.pid' -t ${PUMA_WORKERS:-0:1}"
delayed-job:
<<: *web
command: bash -c "LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2 bundle exec './bin/delayed_job run'"
deploy:
replicas: ${DELAYED_JOB_REPLICAS:-1}
volumes:
pg_data: