fix dawarich

This commit is contained in:
Phil 2025-02-09 15:43:38 -07:00
parent 8b5e82b7e1
commit 27fce8c757

View File

@ -1,10 +1,10 @@
services: services:
dawarich_redis: dawarich_redis:
image: redis:7.0-alpine image: redis:7.4-alpine
container_name: dawarich_redis container_name: dawarich_redis
command: redis-server command: redis-server
volumes: volumes:
- dawarich_shared:/data - dawarich_redis_data:/var/shared/redis
restart: always restart: always
healthcheck: healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
@ -13,55 +13,51 @@ services:
start_period: 30s start_period: 30s
timeout: 10s timeout: 10s
dawarich_db: dawarich_db:
image: postgres:14.2-alpine image: postgres:17-alpine
shm_size: 1G shm_size: 1G
container_name: dawarich_db container_name: dawarich_db
volumes: volumes:
- dawarich_db_data:/var/lib/postgresql/data - dawarich_db_data:/var/lib/postgresql/data
- dawarich_shared:/var/shared
# - ./postgresql.conf:/etc/postgresql/postgresql.conf # Optional, uncomment if you want to use a custom config
environment: environment:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: {{ dawarich_db_password }} POSTGRES_PASSWORD: {{ dawarich_db_password }}
POSTGRES_DB: dawarich_production
restart: always restart: always
healthcheck: healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres -d dawarich_development" ] test: [ "CMD", "pg_isready", "-U", "postgres" ]
interval: 10s interval: 10s
retries: 5 retries: 5
start_period: 30s start_period: 30s
timeout: 10s 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: dawarich_app:
image: freikin/dawarich:latest image: freikin/dawarich:latest
container_name: dawarich_app container_name: dawarich_app
volumes: volumes:
- dawarich_gem_cache_app:/usr/local/bundle/gems
- dawarich_public:/var/app/public - dawarich_public:/var/app/public
- dawarich_watched:/var/app/tmp/imports/watched - dawarich_watched:/var/app/tmp/imports/watched
stdin_open: true stdin_open: true
tty: true tty: true
entrypoint: dev-entrypoint.sh entrypoint: web-entrypoint.sh
command: ['bin/dev'] command: ['bin/rails', 'server', '-p', '3000', '-b', '::']
restart: on-failure restart: on-failure
environment: environment:
RAILS_ENV: development RAILS_ENV: production
REDIS_URL: redis://dawarich_redis:6379/0 REDIS_URL: redis://dawarich_redis:6379/0
DATABASE_HOST: dawarich_db DATABASE_HOST: dawarich_db
DATABASE_PORT: 5432
DATABASE_USERNAME: postgres DATABASE_USERNAME: postgres
DATABASE_PASSWORD: {{ dawarich_db_password }} DATABASE_PASSWORD: {{ dawarich_db_password }}
DATABASE_NAME: dawarich_development DATABASE_NAME: dawarich_production
MIN_MINUTES_SPENT_IN_CITY: 60 MIN_MINUTES_SPENT_IN_CITY: 60
APPLICATION_HOST: "loclog.thesatelliteoflove.com" APPLICATION_HOSTS: loclog.thesatelliteoflove.com,localhost,::1,127.0.0.1
APPLICATION_HOSTS: "loclog.thesatelliteoflove.com, localhost, 127.0.0.1"
TIME_ZONE: America/Denver TIME_ZONE: America/Denver
APPLICATION_PROTOCOL: http APPLICATION_PROTOCOL: http
DISTANCE_UNIT: mi DISTANCE_UNIT: mi
PHOTON_API_HOST: photon.komoot.io
PHOTON_API_USE_HTTPS: true
PROMETHEUS_EXPORTER_ENABLED: false PROMETHEUS_EXPORTER_ENABLED: false
PROMETHEUS_EXPORTER_HOST: 0.0.0.0 PROMETHEUS_EXPORTER_HOST: 0.0.0.0
PROMETHEUS_EXPORTER_PORT: 9394 PROMETHEUS_EXPORTER_PORT: 9394
ENABLE_TELEMETRY: false # More on telemetry: https://dawarich.app/docs/tutorials/telemetry SECRET_KEY_BASE: 1234567890
RAILS_LOG_TO_STDOUT: "true"
logging: logging:
driver: "json-file" driver: "json-file"
options: options:
@ -89,32 +85,30 @@ services:
image: freikin/dawarich:latest image: freikin/dawarich:latest
container_name: dawarich_sidekiq container_name: dawarich_sidekiq
volumes: volumes:
- dawarich_gem_cache_sidekiq:/usr/local/bundle/gems
- dawarich_public:/var/app/public - dawarich_public:/var/app/public
- dawarich_watched:/var/app/tmp/imports/watched - dawarich_watched:/var/app/tmp/imports/watched
stdin_open: true stdin_open: true
tty: true tty: true
entrypoint: dev-entrypoint.sh entrypoint: sidekiq-entrypoint.sh
command: ['sidekiq'] command: ['bundle', 'exec', 'sidekiq']
restart: on-failure restart: on-failure
environment: environment:
RAILS_ENV: development RAILS_ENV: production
REDIS_URL: redis://dawarich_redis:6379/0 REDIS_URL: redis://dawarich_redis:6379/0
DATABASE_HOST: dawarich_db DATABASE_HOST: dawarich_db
DATABASE_PORT: 5432
DATABASE_USERNAME: postgres DATABASE_USERNAME: postgres
DATABASE_PASSWORD: {{ dawarich_db_password }} DATABASE_PASSWORD: {{ dawarich_db_password }}
DATABASE_NAME: dawarich_development DATABASE_NAME: dawarich_production
APPLICATION_HOST: "loclog.thesatelliteoflove.com" APPLICATION_HOSTS: loclog.thesatelliteoflove.com,localhost,::1,127.0.0.1
APPLICATION_HOSTS: "loclog.thesatelliteoflove.com, localhost, 127.0.0.1"
BACKGROUND_PROCESSING_CONCURRENCY: 10 BACKGROUND_PROCESSING_CONCURRENCY: 10
APPLICATION_PROTOCOL: http APPLICATION_PROTOCOL: http
DISTANCE_UNIT: mi DISTANCE_UNIT: mi
PHOTON_API_HOST: photon.komoot.io
PHOTON_API_USE_HTTPS: true
PROMETHEUS_EXPORTER_ENABLED: false PROMETHEUS_EXPORTER_ENABLED: false
PROMETHEUS_EXPORTER_HOST: dawarich_app PROMETHEUS_EXPORTER_HOST: dawarich_app
PROMETHEUS_EXPORTER_PORT: 9394 PROMETHEUS_EXPORTER_PORT: 9394
ENABLE_TELEMETRY: false # More on telemetry: https://dawarich.app/docs/tutorials/telemetry SECRET_KEY_BASE: 1234567890
RAILS_LOG_TO_STDOUT: "true"
logging: logging:
driver: "json-file" driver: "json-file"
options: options:
@ -144,12 +138,9 @@ services:
volumes: volumes:
dawarich_db_data: dawarich_db_data:
dawarich_gem_cache_app: dawarich_redis_data:
dawarich_gem_cache_sidekiq:
dawarich_shared:
dawarich_public: dawarich_public:
dawarich_watched: dawarich_watched:
networks: networks:
default: default:
external: true external: true