Files
ansible/roles/docker/templates/dawarich-compose.yml.j2
T
PhilandClaude Opus 5.5 58cbdf39f7 Dawarich: back to latest, updated by dockcheck
The 1.7 -> 1.22 upgrade is done; the app gets the dockcheck label.
Redis and Postgres stay excluded in dockcheck.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 18:08:34 -07:00

108 lines
3.1 KiB
Django/Jinja

services:
dawarich_redis:
# Dawarich moved to Redis 8 in 1.18.0; it reads Redis 7.4 data as-is
image: redis:8-alpine
container_name: dawarich_redis
volumes:
- dawarich_redis_data:/data
restart: always
healthcheck:
test: ["CMD", "redis-cli", "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
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: {{ vault_dawarich.postgres_password }}
POSTGRES_DB: dawarich_production
restart: always
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres" ]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
dawarich_app:
image: freikin/dawarich:{{ dawarich_version }}
container_name: dawarich_app
labels:
mag37.dockcheck.update: true
volumes:
- dawarich_public:/var/app/public
- dawarich_watched:/var/app/tmp/imports/watched
- dawarich_storage:/var/app/storage
stdin_open: true
tty: true
entrypoint: web-entrypoint.sh
command: ['bin/rails', 'server', '-p', '3000', '-b', '::']
restart: unless-stopped
# Background jobs run inside this container since 1.17.0; give them time to stop
stop_grace_period: 60s
environment:
RAILS_ENV: production
DATABASE_HOST: dawarich_db
DATABASE_PORT: 5432
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: {{ vault_dawarich.postgres_password }}
DATABASE_NAME: dawarich_production
REDIS_URL: redis://dawarich_redis:6379
MIN_MINUTES_SPENT_IN_CITY: 60
APPLICATION_HOSTS: {{ subdomains.loclog }},localhost,::1,127.0.0.1
PHOTON_API_USE_HTTPS: true
PHOTON_API_HOST: photon.dawarich.app
PHOTON_API_KEY: ca91825827603b39e4cdd6fe4de9063f4ec77e0617454857576dd62b424bb60b
TIME_ZONE: America/Denver
APPLICATION_PROTOCOL: http
DISTANCE_UNIT: mi
PROMETHEUS_EXPORTER_ENABLED: false
PROMETHEUS_EXPORTER_HOST: 0.0.0.0
PROMETHEUS_EXPORTER_PORT: 9394
SECRET_KEY_BASE: {{ vault_dawarich.secret_key_base }}
RAILS_LOG_TO_STDOUT: "true"
# 1.17.0 merged the sidekiq container into the app
SIDEKIQ_EMBEDDED: 'true'
WEB_CONCURRENCY: '0'
BACKGROUND_PROCESSING_CONCURRENCY: 2
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: '1.00'
memory: '4G'
volumes:
dawarich_db_data:
dawarich_redis_data:
dawarich_public:
dawarich_watched:
dawarich_storage:
networks:
default:
external: true
name: {{ docker.network_name }}