dawarich/docker/docker-compose.yml

165 lines
5.5 KiB
YAML
Raw Normal View History

networks:
dawarich:
2025-11-07 06:38:44 -05:00
services:
2025-06-09 07:39:25 -04:00
dawarich_redis:
image: redis:7.4-alpine
container_name: dawarich_redis
command: redis-server
networks:
- dawarich
volumes:
2025-11-07 08:08:01 -05:00
- dawarich_shared:/data
2025-06-09 07:39:25 -04:00
restart: always
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
2025-11-07 06:38:44 -05:00
dawarich_db:
image: postgis/postgis:17-3.5-alpine
0.36.0 (#1952) * Implement OmniAuth GitHub authentication * Fix omniauth GitHub scope to include user email access * Remove margin-bottom * Implement Google OAuth2 authentication * Implement OIDC authentication for Dawarich using omniauth_openid_connect gem. * Add patreon account linking and patron checking service * Update docker-compose.yml to use boolean values instead of strings * Add support for KML files * Add tests * Update changelog * Remove patreon OAuth integration * Move omniauthable to a concern * Update an icon in integrations * Update changelog * Update app version * Fix family location sharing toggle * Move family location sharing to its own controller * Update changelog * Implement basic tagging functionality for places, allowing users to categorize and label places with custom tags. * Add places management API and tags feature * Add some changes related to places management feature * Fix some tests * Fix sometests * Add places layer * Update places layer to use Leaflet.Control.Layers.Tree for hierarchical layer control * Rework tag form * Add hashtag * Add privacy zones to tags * Add notes to places and manage place tags * Update changelog * Update e2e tests * Extract tag serializer to its own file * Fix some tests * Fix tags request specs * Fix some tests * Fix rest of the tests * Revert some changes * Add missing specs * Revert changes in place export/import code * Fix some specs * Fix PlaceFinder to only consider global places when finding existing places * Fix few more specs * Fix visits creator spec * Fix last tests * Update place creating modal * Add home location based on "Home" tagged place * Save enabled tag layers * Some fixes * Fix bug where enabling place tag layers would trigger saving enabled layers, overwriting with incomplete data * Update migration to use disable_ddl_transaction! and add up/down methods * Fix tag layers restoration and filtering logic * Update OIDC auto-registration and email/password registration settings * Fix potential xss
2025-11-24 13:45:09 -05:00
# 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:
2024-11-30 06:18:18 -05:00
- dawarich_db_data:/var/lib/postgresql/data
- dawarich_shared:/var/shared
networks:
- dawarich
environment:
2025-11-07 06:38:44 -05:00
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_DB: ${POSTGRES_DB:-dawarich_development}
restart: always
healthcheck:
2025-11-07 06:38:44 -05:00
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
2025-11-07 06:38:44 -05:00
dawarich_app:
2025-01-09 09:15:56 -05:00
image: freikin/dawarich:latest
container_name: dawarich_app
volumes:
2024-11-30 06:18:18 -05:00
- 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:
2025-11-07 06:38:44 -05:00
- "${DAWARICH_APP_PORT:-3000}:3000"
# - "${PROMETHEUS_PORT:-9394}:9394" # Prometheus exporter, uncomment if needed
stdin_open: true
tty: true
entrypoint: web-entrypoint.sh
2025-01-09 07:38:13 -05:00
command: ['bin/rails', 'server', '-p', '3000', '-b', '::']
2024-05-18 06:13:29 -04:00
restart: on-failure
environment:
2025-11-07 06:38:44 -05:00
RAILS_ENV: ${RAILS_ENV:-development}
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}
MIN_MINUTES_SPENT_IN_CITY: ${MIN_MINUTES_SPENT_IN_CITY:-60}
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}
2025-11-07 06:38:44 -05:00
PROMETHEUS_EXPORTER_HOST: ${PROMETHEUS_EXPORTER_HOST:-0.0.0.0}
PROMETHEUS_EXPORTER_PORT: ${PROMETHEUS_EXPORTER_PORT:-9394}
2025-11-09 13:32:07 -05:00
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}
2024-07-09 14:09:43 -04:00
logging:
driver: "json-file"
options:
2025-11-07 06:38:44 -05:00
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:
2024-10-14 14:44:24 -04:00
dawarich_db:
condition: service_healthy
restart: true
2025-06-09 15:00:19 -04:00
dawarich_redis:
2025-06-09 07:39:25 -04:00
condition: service_healthy
restart: true
deploy:
resources:
limits:
2025-11-07 06:38:44 -05:00
cpus: ${APP_CPU_LIMIT:-0.50}
memory: ${APP_MEMORY_LIMIT:-4G}
2025-06-09 07:39:25 -04:00
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: on-failure
environment:
2025-11-07 06:38:44 -05:00
RAILS_ENV: ${RAILS_ENV:-development}
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:-10}
APPLICATION_PROTOCOL: ${APPLICATION_PROTOCOL:-http}
PROMETHEUS_EXPORTER_ENABLED: ${PROMETHEUS_EXPORTER_ENABLED:-false}
2025-11-07 06:38:44 -05:00
PROMETHEUS_EXPORTER_HOST: ${PROMETHEUS_EXPORTER_HOST_SIDEKIQ:-dawarich_app}
PROMETHEUS_EXPORTER_PORT: ${PROMETHEUS_EXPORTER_PORT:-9394}
2025-11-09 13:32:07 -05:00
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}
2025-06-09 07:39:25 -04:00
logging:
driver: "json-file"
options:
2025-11-07 06:38:44 -05:00
max-size: ${LOG_MAX_SIZE:-100m}
max-file: ${LOG_MAX_FILE:-5}
2025-06-09 07:39:25 -04:00
healthcheck:
2025-06-09 08:10:49 -04:00
test: [ "CMD-SHELL", "pgrep -f sidekiq" ]
2025-06-09 07:39:25 -04:00
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
2025-06-09 10:00:34 -04:00
volumes:
2024-11-30 06:18:18 -05:00
dawarich_db_data:
dawarich_shared:
dawarich_public:
dawarich_watched:
dawarich_storage: