Files
ansible/roles/docker/templates/dawarich-compose.yml.j2
Phil e1b6d3132a feat: update service versions and add backup configurations
- Update Authentik to 2025.6.4
- Update Dawarich and Karakeep to latest versions
- Add Paperless-NGX backup with S3 storage
- Improve GoToSocial backup configuration with better naming and retention
- Add dockcheck update labels for automated container monitoring

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:26:16 -06:00

158 lines
4.4 KiB
Django/Jinja

services:
dawarich_redis:
image: redis:7.4-alpine
container_name: dawarich_redis
labels:
glance.parent: dawarich
glance.name: 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
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: {{ 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:latest
container_name: dawarich_app
labels:
glance.name: Dawarich
glance.icon: si:openstreetmap
glance.url: https://{{ subdomains.loclog }}/
glance.description: Dawarich
glance.id: dawarich
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: on-failure
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
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"
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: '2G'
dawarich_sidekiq:
image: freikin/dawarich:latest
container_name: dawarich_sidekiq
labels:
glance.parent: dawarich
glance.name: Sidekiq
volumes:
- dawarich_public:/var/app/public
- dawarich_watched:/var/app/tmp/imports/watched
- dawarich_storage:/var/app/storage
stdin_open: true
tty: true
entrypoint: sidekiq-entrypoint.sh
command: ['sidekiq']
restart: on-failure
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
TIME_ZONE: America/Denver
APPLICATION_PROTOCOL: http
DISTANCE_UNIT: mi
PROMETHEUS_EXPORTER_ENABLED: false
SECRET_KEY_BASE: {{ vault_dawarich.secret_key_base }}
RAILS_LOG_TO_STDOUT: "true"
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "5"
healthcheck:
test: ["CMD-SHELL", "ps aux | grep '[s]idekiq' || exit 1"]
interval: 10s
retries: 30
start_period: 30s
timeout: 10s
depends_on:
dawarich_app:
condition: service_healthy
restart: true
dawarich_db:
condition: service_healthy
restart: true
dawarich_redis:
condition: service_healthy
restart: true
volumes:
dawarich_db_data:
dawarich_redis_data:
dawarich_public:
dawarich_watched:
dawarich_storage:
networks:
default:
external: true
name: {{ docker.network_name }}