- new stack traefik-network-connector: attaches atlas traefik to networks of containers labelled traefik.enable=true (obeone/traefik_network_connector) - dawarich: rewrite to upstream compose style (private dawarich network, no default-bridge sharing, no legacy links). Keep pinned image tags, host port 3007 (pangolin/newt target), photon override, concurrency 10. RAILS_ENV development -> production (+ SECRET_KEY_BASE, upstream default).
166 lines
4.8 KiB
YAML
166 lines
4.8 KiB
YAML
# Based on upstream https://github.com/Freika/dawarich/blob/master/docker/docker-compose.yml
|
|
# Local deviations:
|
|
# - image tags pinned (repo convention; Renovate bumps)
|
|
# - host port 3007 -> 3000: pangolin (newt) and LAN clients target
|
|
# 192.168.10.144:3007, so it must stay published on the host
|
|
# - traefik labels on dawarich_app: Atlas traefik does NOT sit on this
|
|
# network; traefik-network-connector (own stack) attaches it on start
|
|
# - RAILS_ENV production (upstream default; install predates the switch)
|
|
# - BACKGROUND_PROCESSING_CONCURRENCY 10 (upstream default 3; tuned for
|
|
# large imports)
|
|
# - local photon geocoding (photon container currently disabled)
|
|
networks:
|
|
dawarich:
|
|
|
|
services:
|
|
dawarich_redis:
|
|
image: redis:7.4-alpine
|
|
container_name: dawarich_redis
|
|
command: >
|
|
redis-server
|
|
--save 900 1
|
|
--save 300 10
|
|
--appendonly no
|
|
networks:
|
|
- dawarich
|
|
volumes:
|
|
- dawarich_shared:/data
|
|
restart: always
|
|
healthcheck:
|
|
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
|
|
interval: 10s
|
|
retries: 5
|
|
start_period: 30s
|
|
timeout: 10s
|
|
|
|
dawarich_db:
|
|
image: postgis/postgis:17-3.5-alpine
|
|
shm_size: 1G
|
|
container_name: dawarich_db
|
|
volumes:
|
|
- dawarich_db_data:/var/lib/postgresql/data
|
|
- dawarich_shared:/var/shared
|
|
networks:
|
|
- dawarich
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: password
|
|
POSTGRES_DB: dawarich_development
|
|
restart: always
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "pg_isready -U postgres -d dawarich_development || exit 1" ]
|
|
interval: 10s
|
|
retries: 5
|
|
start_period: 30s
|
|
timeout: 10s
|
|
|
|
dawarich_app:
|
|
image: freikin/dawarich:1.15.3
|
|
container_name: dawarich_app
|
|
volumes:
|
|
- dawarich_public:/var/app/public
|
|
- dawarich_watched:/var/app/tmp/imports/watched
|
|
- dawarich_storage:/var/app/storage
|
|
- dawarich_db_data:/dawarich_db_data
|
|
networks:
|
|
- dawarich
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.dawarich.rule=Host(`dawarich.arnoutvw.nl`)
|
|
- traefik.http.services.dawarich.loadbalancer.server.port=3000
|
|
ports:
|
|
# custom host port: pangolin/newt + LAN target 192.168.10.144:3007
|
|
- 3007:3000
|
|
stdin_open: true
|
|
tty: true
|
|
entrypoint: web-entrypoint.sh
|
|
command: [ 'bin/rails', 'server', '-p', '3000', '-b', '::' ]
|
|
restart: unless-stopped
|
|
environment:
|
|
RAILS_ENV: production
|
|
SECRET_KEY_BASE: 2f5e59518ddeaeb978c73bc265eea20a91d5fe203d2a45280bd8fbf62b447b57
|
|
REDIS_URL: redis://dawarich_redis:6379
|
|
DATABASE_HOST: dawarich_db
|
|
DATABASE_USERNAME: postgres
|
|
DATABASE_PASSWORD: password
|
|
DATABASE_NAME: dawarich_development
|
|
MIN_MINUTES_SPENT_IN_CITY: 60
|
|
APPLICATION_HOSTS: localhost,dawarich.arnoutvw.nl,192.168.10.144
|
|
PHOTON_API_HOST: 192.168.10.144:2322
|
|
PHOTON_API_USE_HTTPS: false
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "100m"
|
|
max-file: "5"
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "wget -qO - http://127.0.0.1:3000/api/v1/health | grep -q '\"status\"\\s*:\\s*\"ok\"'" ]
|
|
interval: 10s
|
|
retries: 30
|
|
start_period: 30s
|
|
timeout: 10s
|
|
depends_on:
|
|
dawarich_db:
|
|
condition: service_healthy
|
|
restart: true
|
|
dawarich_redis:
|
|
condition: service_healthy
|
|
restart: true
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '0.50'
|
|
memory: '4G'
|
|
|
|
dawarich_sidekiq:
|
|
image: freikin/dawarich:1.15.3
|
|
container_name: dawarich_sidekiq
|
|
volumes:
|
|
- dawarich_public:/var/app/public
|
|
- dawarich_watched:/var/app/tmp/imports/watched
|
|
- dawarich_storage:/var/app/storage
|
|
networks:
|
|
- dawarich
|
|
stdin_open: true
|
|
tty: true
|
|
entrypoint: sidekiq-entrypoint.sh
|
|
command: [ 'sidekiq' ]
|
|
restart: unless-stopped
|
|
environment:
|
|
RAILS_ENV: production
|
|
REDIS_URL: redis://dawarich_redis:6379
|
|
DATABASE_HOST: dawarich_db
|
|
DATABASE_USERNAME: postgres
|
|
DATABASE_PASSWORD: password
|
|
DATABASE_NAME: dawarich_development
|
|
BACKGROUND_PROCESSING_CONCURRENCY: 10
|
|
PHOTON_API_HOST: 192.168.10.144:2322
|
|
PHOTON_API_USE_HTTPS: false
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "100m"
|
|
max-file: "5"
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "pgrep -f sidekiq" ]
|
|
interval: 10s
|
|
retries: 30
|
|
start_period: 30s
|
|
timeout: 10s
|
|
depends_on:
|
|
dawarich_db:
|
|
condition: service_healthy
|
|
restart: true
|
|
dawarich_redis:
|
|
condition: service_healthy
|
|
restart: true
|
|
dawarich_app:
|
|
condition: service_healthy
|
|
restart: true
|
|
|
|
volumes:
|
|
dawarich_db_data:
|
|
dawarich_shared:
|
|
dawarich_public:
|
|
dawarich_watched:
|
|
dawarich_storage: |