ansible/roles/docker/templates/dawarich-compose.yml.j2
Phil 249eb52ceb feat: update Dawarich to 0.27.3 and align with production configuration
- Update image from latest to 0.27.3
- Remove Redis and Sidekiq services (now uses SQLite queues)
- Add storage volume and database paths for SQLite queues
- Align with production compose file reference
- Document reference configuration in CLAUDE.md

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-06 14:40:13 -06:00

88 lines
2.6 KiB
Django/Jinja

services:
dawarich_db:
image: postgis/postgis:17-3.5-alpine
shm_size: 1G
labels:
glance.parent: dawarich
glance.name: DB
container_name: dawarich_db
volumes:
- dawarich_db_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: {{ dawarich_db_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:0.27.3
container_name: dawarich_app
labels:
glance.name: Dawarich
glance.icon: si:openstreetmap
glance.url: https://loclog.thesatelliteoflove.com/
glance.description: Dawarich
glance.id: dawarich
volumes:
- dawarich_public:/var/app/public
- dawarich_watched:/var/app/tmp/imports/watched
- dawarich_storage:/var/app/storage
- dawarich_db_data:/dawarich_db_data
stdin_open: true
tty: true
entrypoint: web-entrypoint.sh
command: ['bin/rails', 'server', '-p', '3000', '-b', '::']
restart: on-failure
environment:
RAILS_ENV: production
QUEUE_DATABASE_PATH: /dawarich_db_data/dawarich_production_queue.sqlite3
CACHE_DATABASE_PATH: /dawarich_db_data/dawarich_production_cache.sqlite3
DATABASE_HOST: dawarich_db
DATABASE_PORT: 5432
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: {{ dawarich_db_password }}
DATABASE_NAME: dawarich_production
MIN_MINUTES_SPENT_IN_CITY: 60
APPLICATION_HOSTS: loclog.thesatelliteoflove.com,localhost,::1,127.0.0.1
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: 1234567890
RAILS_LOG_TO_STDOUT: "true"
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
deploy:
resources:
limits:
cpus: '0.50' # Limit CPU usage to 50% of one core
memory: '2G' # Limit memory usage to 2GB
volumes:
dawarich_db_data:
dawarich_public:
dawarich_watched:
dawarich_storage:
networks:
default:
external: true
name: lava