Created
September 4, 2026 09:15
-
-
Save elpatron68/bafbf25fa57cc4df5ada7264fa308a63 to your computer and use it in GitHub Desktop.
My Dawarich Docker Compose File w/ Watchtower, Gotity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| labels: | |
| - com.centurylinklabs.watchtower.enable=false | |
| 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 | |
| # image: imresamu/postgis:17-3.5-alpine # If you're on ARM architecture, use this image instead | |
| 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_USER:-postgres} | |
| POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password} | |
| POSTGRES_DB: ${POSTGRES_DB:-dawarich_development} | |
| restart: always | |
| labels: | |
| - com.centurylinklabs.watchtower.enable=false | |
| healthcheck: | |
| test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-dawarich_development}" ] | |
| interval: 10s | |
| retries: 5 | |
| start_period: 30s | |
| timeout: 10s | |
| # command: postgres -c config_file=/etc/postgresql/postgresql.conf # Use custom config, uncomment if you want to use a custom config | |
| dawarich_app: | |
| image: freikin/dawarich:latest | |
| 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 | |
| ports: | |
| - "${DAWARICH_APP_PORT:-3000}:3000" | |
| # - "${PROMETHEUS_PORT:-9394}:9394" # Prometheus exporter, uncomment if needed | |
| stdin_open: true | |
| tty: true | |
| entrypoint: web-entrypoint.sh | |
| command: ['bin/rails', 'server', '-p', '3000', '-b', '::'] | |
| restart: unless-stopped | |
| labels: | |
| - com.centurylinklabs.watchtower.enable=true | |
| environment: | |
| RAILS_ENV: ${RAILS_ENV:-production} | |
| REDIS_URL: ${REDIS_URL:-redis://dawarich_redis:6379} | |
| DATABASE_HOST: ${DATABASE_HOST:-dawarich_db} | |
| DATABASE_PORT: ${DATABASE_PORT:-5432} | |
| DATABASE_USERNAME: ${DATABASE_USERNAME:-postgres} | |
| DATABASE_PASSWORD: ${DATABASE_PASSWORD:-password} | |
| DATABASE_NAME: ${DATABASE_NAME:-dawarich_development} | |
| APPLICATION_HOSTS: ${APPLICATION_HOSTS:-localhost,::1,127.0.0.1} | |
| TIME_ZONE: ${TIME_ZONE:-Europe/London} | |
| APPLICATION_PROTOCOL: ${APPLICATION_PROTOCOL:-http} | |
| PROMETHEUS_EXPORTER_ENABLED: ${PROMETHEUS_EXPORTER_ENABLED:-false} | |
| PROMETHEUS_EXPORTER_HOST: ${PROMETHEUS_EXPORTER_HOST:-0.0.0.0} | |
| PROMETHEUS_EXPORTER_PORT: ${PROMETHEUS_EXPORTER_PORT:-9394} | |
| SECRET_KEY_BASE: ${SECRET_KEY_BASE:-"CHANGE_ME"} | |
| RAILS_LOG_TO_STDOUT: ${RAILS_LOG_TO_STDOUT:-true} | |
| SELF_HOSTED: ${SELF_HOSTED:-true} | |
| STORE_GEODATA: ${STORE_GEODATA:-true} | |
| ### OTP encryption keys are required if you want to use 2FA | |
| # OTP_ENCRYPTION_PRIMARY_KEY: ${OTP_ENCRYPTION_PRIMARY_KEY:-} | |
| # OTP_ENCRYPTION_DETERMINISTIC_KEY: ${OTP_ENCRYPTION_DETERMINISTIC_KEY:-} | |
| # OTP_ENCRYPTION_KEY_DERIVATION_SALT: ${OTP_ENCRYPTION_KEY_DERIVATION_SALT:-} | |
| logging: | |
| driver: "json-file" | |
| options: | |
| max-size: ${LOG_MAX_SIZE:-100m} | |
| max-file: ${LOG_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: ${APP_CPU_LIMIT:-0.50} | |
| memory: ${APP_MEMORY_LIMIT:-4G} | |
| dawarich_sidekiq: | |
| image: freikin/dawarich:latest | |
| 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 | |
| labels: | |
| - com.centurylinklabs.watchtower.enable=true | |
| - com.centurylinklabs.watchtower.depends-on=dawarich_app | |
| environment: | |
| RAILS_ENV: ${RAILS_ENV:-production} | |
| REDIS_URL: ${REDIS_URL:-redis://dawarich_redis:6379} | |
| DATABASE_HOST: ${DATABASE_HOST:-dawarich_db} | |
| DATABASE_PORT: ${DATABASE_PORT:-5432} | |
| DATABASE_USERNAME: ${DATABASE_USERNAME:-postgres} | |
| DATABASE_PASSWORD: ${DATABASE_PASSWORD:-password} | |
| DATABASE_NAME: ${DATABASE_NAME:-dawarich_development} | |
| APPLICATION_HOSTS: ${APPLICATION_HOSTS:-localhost,::1,127.0.0.1} | |
| BACKGROUND_PROCESSING_CONCURRENCY: ${BACKGROUND_PROCESSING_CONCURRENCY:-5} | |
| APPLICATION_PROTOCOL: ${APPLICATION_PROTOCOL:-http} | |
| PROMETHEUS_EXPORTER_ENABLED: ${PROMETHEUS_EXPORTER_ENABLED:-false} | |
| PROMETHEUS_EXPORTER_HOST: ${PROMETHEUS_EXPORTER_HOST_SIDEKIQ:-dawarich_app} | |
| PROMETHEUS_EXPORTER_PORT: ${PROMETHEUS_EXPORTER_PORT:-9394} | |
| SECRET_KEY_BASE: ${SECRET_KEY_BASE:-"CHANGE_ME"} | |
| RAILS_LOG_TO_STDOUT: ${RAILS_LOG_TO_STDOUT:-true} | |
| SELF_HOSTED: ${SELF_HOSTED:-true} | |
| STORE_GEODATA: ${STORE_GEODATA:-true} | |
| ### OTP encryption keys are required if you want to use 2FA | |
| # OTP_ENCRYPTION_PRIMARY_KEY: ${OTP_ENCRYPTION_PRIMARY_KEY:-} | |
| # OTP_ENCRYPTION_DETERMINISTIC_KEY: ${OTP_ENCRYPTION_DETERMINISTIC_KEY:-} | |
| # OTP_ENCRYPTION_KEY_DERIVATION_SALT: ${OTP_ENCRYPTION_KEY_DERIVATION_SALT:-} | |
| logging: | |
| driver: "json-file" | |
| options: | |
| max-size: ${LOG_MAX_SIZE:-100m} | |
| max-file: ${LOG_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 | |
| dawarich_watchtower: | |
| image: nickfedor/watchtower:latest | |
| container_name: dawarich_watchtower | |
| restart: unless-stopped | |
| volumes: | |
| - /var/run/docker.sock:/var/run/docker.sock | |
| environment: | |
| TZ: ${TIME_ZONE:-Europe/Berlin} | |
| WATCHTOWER_LABEL_ENABLE: "true" | |
| WATCHTOWER_CLEANUP: "true" | |
| WATCHTOWER_INCLUDE_RESTARTING: "true" | |
| WATCHTOWER_TIMEOUT: ${WATCHTOWER_TIMEOUT:-60s} | |
| WATCHTOWER_SCHEDULE: ${WATCHTOWER_SCHEDULE:-0 0 4 * * *} | |
| WATCHTOWER_NOTIFICATION_URL: ${WATCHTOWER_NOTIFICATION_URL:-} | |
| WATCHTOWER_NOTIFICATION_REPORT: ${WATCHTOWER_NOTIFICATION_REPORT:-true} | |
| WATCHTOWER_NOTIFICATIONS_HOSTNAME: ${WATCHTOWER_NOTIFICATIONS_HOSTNAME:-dawarich} | |
| WATCHTOWER_NOTIFICATION_TITLE_TAG: ${WATCHTOWER_NOTIFICATION_TITLE_TAG:-Dawarich} | |
| labels: | |
| - com.centurylinklabs.watchtower.enable=true | |
| logging: | |
| driver: "json-file" | |
| options: | |
| max-size: ${LOG_MAX_SIZE:-100m} | |
| max-file: ${LOG_MAX_FILE:-5} | |
| volumes: | |
| dawarich_db_data: | |
| dawarich_shared: | |
| dawarich_public: | |
| dawarich_watched: | |
| dawarich_storage: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment