2022-04-06 14:46:10 -04:00
|
|
|
networks:
|
2024-03-15 18:45:48 -04:00
|
|
|
dawarich:
|
2022-04-06 14:46:10 -04:00
|
|
|
services:
|
2024-03-15 18:31:47 -04:00
|
|
|
dawarich_redis:
|
2024-03-15 18:31:06 -04:00
|
|
|
image: redis:7.0-alpine
|
2024-11-14 05:43:41 -05:00
|
|
|
container_name: dawarich_redis
|
2022-04-06 14:46:10 -04:00
|
|
|
command: redis-server
|
|
|
|
|
networks:
|
2024-03-15 18:45:48 -04:00
|
|
|
- dawarich
|
2022-04-06 14:46:10 -04:00
|
|
|
volumes:
|
|
|
|
|
- shared_data:/var/shared/redis
|
2024-08-16 07:01:39 -04:00
|
|
|
restart: always
|
2024-10-14 14:42:18 -04:00
|
|
|
healthcheck:
|
|
|
|
|
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
|
|
|
|
|
interval: 10s
|
|
|
|
|
retries: 5
|
|
|
|
|
start_period: 30s
|
|
|
|
|
timeout: 10s
|
2024-03-15 18:31:47 -04:00
|
|
|
dawarich_db:
|
2022-04-06 14:46:10 -04:00
|
|
|
image: postgres:14.2-alpine
|
2024-03-15 18:31:47 -04:00
|
|
|
container_name: dawarich_db
|
2022-04-06 14:46:10 -04:00
|
|
|
volumes:
|
|
|
|
|
- db_data:/var/lib/postgresql/data
|
|
|
|
|
- shared_data:/var/shared
|
|
|
|
|
networks:
|
2024-03-15 18:45:48 -04:00
|
|
|
- dawarich
|
2022-04-06 14:46:10 -04:00
|
|
|
environment:
|
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
|
POSTGRES_PASSWORD: password
|
2024-08-16 07:01:39 -04:00
|
|
|
restart: always
|
2024-10-14 14:42:18 -04:00
|
|
|
healthcheck:
|
|
|
|
|
test: [ "CMD-SHELL", "pg_isready -U postgres -d dawarich_development" ]
|
|
|
|
|
interval: 10s
|
|
|
|
|
retries: 5
|
|
|
|
|
start_period: 30s
|
|
|
|
|
timeout: 10s
|
2024-03-15 18:31:47 -04:00
|
|
|
dawarich_app:
|
2024-04-30 16:21:17 -04:00
|
|
|
image: freikin/dawarich:latest
|
2024-03-15 18:31:47 -04:00
|
|
|
container_name: dawarich_app
|
2022-04-06 14:46:10 -04:00
|
|
|
volumes:
|
2024-11-30 06:16:41 -05:00
|
|
|
- gem_cache_app:/usr/local/bundle/gems_app
|
2024-06-12 15:02:42 -04:00
|
|
|
- public:/var/app/public
|
2024-10-05 08:13:48 -04:00
|
|
|
- watched:/var/app/tmp/imports/watched
|
2022-04-06 14:46:10 -04:00
|
|
|
networks:
|
2024-03-15 18:45:48 -04:00
|
|
|
- dawarich
|
2022-04-06 14:46:10 -04:00
|
|
|
ports:
|
|
|
|
|
- 3000:3000
|
2024-11-20 15:05:02 -05:00
|
|
|
# - 9394:9394 # Prometheus exporter, uncomment if needed
|
2022-04-06 14:46:10 -04:00
|
|
|
stdin_open: true
|
|
|
|
|
tty: true
|
|
|
|
|
entrypoint: dev-entrypoint.sh
|
2022-04-07 12:45:38 -04:00
|
|
|
command: ['bin/dev']
|
2024-05-18 06:13:29 -04:00
|
|
|
restart: on-failure
|
2022-04-06 14:46:10 -04:00
|
|
|
environment:
|
|
|
|
|
RAILS_ENV: development
|
2024-03-15 18:31:47 -04:00
|
|
|
REDIS_URL: redis://dawarich_redis:6379/0
|
|
|
|
|
DATABASE_HOST: dawarich_db
|
2024-03-15 18:31:06 -04:00
|
|
|
DATABASE_USERNAME: postgres
|
|
|
|
|
DATABASE_PASSWORD: password
|
2024-03-15 18:31:47 -04:00
|
|
|
DATABASE_NAME: dawarich_development
|
2024-05-05 06:03:25 -04:00
|
|
|
MIN_MINUTES_SPENT_IN_CITY: 60
|
2024-04-05 16:20:12 -04:00
|
|
|
APPLICATION_HOST: localhost
|
2024-07-08 12:05:02 -04:00
|
|
|
APPLICATION_HOSTS: localhost
|
2024-06-08 16:41:33 -04:00
|
|
|
TIME_ZONE: Europe/London
|
2024-07-08 12:05:02 -04:00
|
|
|
APPLICATION_PROTOCOL: http
|
2024-08-28 18:09:04 -04:00
|
|
|
DISTANCE_UNIT: km
|
2024-10-19 12:43:08 -04:00
|
|
|
PHOTON_API_HOST: photon.komoot.io
|
|
|
|
|
PHOTON_API_USE_HTTPS: true
|
2024-11-20 16:03:29 -05:00
|
|
|
PROMETHEUS_EXPORTER_ENABLED: false
|
2024-11-20 15:05:02 -05:00
|
|
|
PROMETHEUS_EXPORTER_HOST: 0.0.0.0
|
2024-11-20 14:42:28 -05:00
|
|
|
PROMETHEUS_EXPORTER_PORT: 9394
|
2024-07-09 14:09:43 -04:00
|
|
|
logging:
|
|
|
|
|
driver: "json-file"
|
|
|
|
|
options:
|
|
|
|
|
max-size: "100m"
|
|
|
|
|
max-file: "5"
|
2024-10-14 14:42:18 -04:00
|
|
|
healthcheck:
|
|
|
|
|
test: [ "CMD-SHELL", "wget -qO - http://127.0.0.1:3000/api/v1/health | grep -q '\"status\"\\s*:\\s*\"ok\"'" ]
|
|
|
|
|
interval: 10s
|
2024-11-20 18:47:27 -05:00
|
|
|
retries: 30
|
2024-10-14 14:42:18 -04:00
|
|
|
start_period: 30s
|
|
|
|
|
timeout: 10s
|
2022-04-06 14:46:10 -04:00
|
|
|
depends_on:
|
2024-10-14 14:44:24 -04:00
|
|
|
dawarich_db:
|
2024-10-14 14:42:18 -04:00
|
|
|
condition: service_healthy
|
|
|
|
|
restart: true
|
2024-10-14 14:44:24 -04:00
|
|
|
dawarich_redis:
|
2024-10-14 14:42:18 -04:00
|
|
|
condition: service_healthy
|
|
|
|
|
restart: true
|
2024-09-02 12:28:17 -04:00
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
cpus: '0.50' # Limit CPU usage to 50% of one core
|
|
|
|
|
memory: '2G' # Limit memory usage to 2GB
|
2024-03-24 15:09:10 -04:00
|
|
|
dawarich_sidekiq:
|
2024-04-30 16:21:17 -04:00
|
|
|
image: freikin/dawarich:latest
|
2024-03-24 15:09:10 -04:00
|
|
|
container_name: dawarich_sidekiq
|
|
|
|
|
volumes:
|
2024-11-30 06:16:41 -05:00
|
|
|
- gem_cache_sidekiq:/usr/local/bundle/gems_sidekiq
|
2024-06-14 12:17:42 -04:00
|
|
|
- public:/var/app/public
|
2024-10-05 08:13:48 -04:00
|
|
|
- watched:/var/app/tmp/imports/watched
|
2024-03-24 15:09:10 -04:00
|
|
|
networks:
|
|
|
|
|
- dawarich
|
|
|
|
|
stdin_open: true
|
|
|
|
|
tty: true
|
|
|
|
|
entrypoint: dev-entrypoint.sh
|
|
|
|
|
command: ['sidekiq']
|
2024-04-06 16:31:33 -04:00
|
|
|
restart: on-failure
|
2024-03-24 15:09:10 -04:00
|
|
|
environment:
|
|
|
|
|
RAILS_ENV: development
|
|
|
|
|
REDIS_URL: redis://dawarich_redis:6379/0
|
|
|
|
|
DATABASE_HOST: dawarich_db
|
|
|
|
|
DATABASE_USERNAME: postgres
|
|
|
|
|
DATABASE_PASSWORD: password
|
|
|
|
|
DATABASE_NAME: dawarich_development
|
2024-04-05 16:20:12 -04:00
|
|
|
APPLICATION_HOST: localhost
|
2024-07-08 12:05:02 -04:00
|
|
|
APPLICATION_HOSTS: localhost
|
2024-06-07 13:22:39 -04:00
|
|
|
BACKGROUND_PROCESSING_CONCURRENCY: 10
|
2024-07-08 12:05:02 -04:00
|
|
|
APPLICATION_PROTOCOL: http
|
2024-08-28 18:09:04 -04:00
|
|
|
DISTANCE_UNIT: km
|
2024-10-19 12:43:08 -04:00
|
|
|
PHOTON_API_HOST: photon.komoot.io
|
|
|
|
|
PHOTON_API_USE_HTTPS: true
|
2024-11-20 14:42:28 -05:00
|
|
|
PROMETHEUS_EXPORTER_ENABLED: false
|
|
|
|
|
PROMETHEUS_EXPORTER_HOST: dawarich_app
|
|
|
|
|
PROMETHEUS_EXPORTER_PORT: 9394
|
2024-07-09 14:09:43 -04:00
|
|
|
logging:
|
|
|
|
|
driver: "json-file"
|
|
|
|
|
options:
|
|
|
|
|
max-size: "100m"
|
|
|
|
|
max-file: "5"
|
2024-10-14 14:42:18 -04:00
|
|
|
healthcheck:
|
2024-11-04 12:47:15 -05:00
|
|
|
test: [ "CMD-SHELL", "bundle exec sidekiqmon processes | grep $${HOSTNAME}" ]
|
2024-10-14 14:42:18 -04:00
|
|
|
interval: 10s
|
2024-11-20 18:47:27 -05:00
|
|
|
retries: 30
|
2024-10-14 14:42:18 -04:00
|
|
|
start_period: 30s
|
|
|
|
|
timeout: 10s
|
2024-03-24 15:09:10 -04:00
|
|
|
depends_on:
|
2024-10-14 14:44:24 -04:00
|
|
|
dawarich_db:
|
2024-10-14 14:42:18 -04:00
|
|
|
condition: service_healthy
|
|
|
|
|
restart: true
|
2024-10-14 14:44:24 -04:00
|
|
|
dawarich_redis:
|
2024-10-14 14:42:18 -04:00
|
|
|
condition: service_healthy
|
|
|
|
|
restart: true
|
2024-10-14 14:44:24 -04:00
|
|
|
dawarich_app:
|
2024-10-14 14:42:18 -04:00
|
|
|
condition: service_healthy
|
|
|
|
|
restart: true
|
2024-09-02 12:28:17 -04:00
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
cpus: '0.50' # Limit CPU usage to 50% of one core
|
|
|
|
|
memory: '2G' # Limit memory usage to 2GB
|
2024-03-15 18:31:06 -04:00
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
db_data:
|
2024-11-30 06:16:41 -05:00
|
|
|
gem_cache_app:
|
|
|
|
|
gem_cache_sidekiq:
|
2024-03-15 18:31:06 -04:00
|
|
|
shared_data:
|
2024-06-12 15:02:42 -04:00
|
|
|
public:
|
2024-10-05 08:13:48 -04:00
|
|
|
watched:
|