-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (61 loc) · 1.89 KB
/
docker-compose.yml
File metadata and controls
65 lines (61 loc) · 1.89 KB
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
x-default-service: &default-service
build: .
image: ghcr.io/cartoway/optimizer-api:${CARTOROUTE_VERSION:-dev}
environment: &default-environment
APP_ENV: ${APP_ENV:-development}
LOG_LEVEL: ${LOG_LEVEL:-info}
OPTIM_DEFAULT_MAX_LATENESS_RATIO: 1
OPTIM_GENERATE_GEOJSON_POLYLINES: 'true'
# REDIS_CACHE_HOST: redis-cache
REDIS_RESQUE_HOST: redis-resque
REDIS_RESULT_TTL_DAYS: ${REDIS_RESULT_TTL_DAYS:-1}
ROUTER_URL: ${ROUTER_URL:-http://localhost:8082/0.1}
ROUTER_API_KEY: ${ROUTER_API_KEY:-demo}
SENTRY_DSN: ${SENTRY_DSN:-}
depends_on:
- redis-resque
# - redis-cache
volumes:
- .:/srv/app
- ./docker/production.rb:/srv/app/config/environments/production.rb
- ./docker/production.rb:/srv/app/config/environments/development.rb
- ./docker/access.rb:/srv/app/config/access.rb
services:
api:
<<: *default-service
ports:
- "8083:80" # HOST:CONTAINER, edit only HOST part
command: bundle exec puma -v -p 80 --pidfile 'server.pid' -t "${PUMA_THREADS:-0:1}" -w "${PUMA_WORKERS:-4}"
restart: unless-stopped
resque-default:
<<: *default-service
environment:
<<: *default-environment
COUNT: 5
QUEUES: DEFAULT
command: bundle exec rake resque:workers --trace
healthcheck:
disable: true
restart: unless-stopped
redis-resque:
image: redis:${REDIS_VERSION:-7-alpine}
command: redis-server --appendonly yes
healthcheck:
test: redis-cli --raw incr ping
start_interval: 1s
start_period: 30s
interval: 30s
timeout: 10s
retries: 5
restart: unless-stopped
# redis-cache:
# image: redis:${REDIS_VERSION:-7-alpine}
# command: redis-server --save ""
# healthcheck:
# test: redis-cli --raw incr ping
# start_interval: 1s
# start_period: 30s
# interval: 30s
# timeout: 10s
# retries: 5
# restart: unless-stopped