Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker compose clean up #470

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Freika
Copy link
Owner

@Freika Freika commented Dec 1, 2024

ENV vars removed from the docker-compose.yml:

      TIME_ZONE: Europe/London
      APPLICATION_PROTOCOL: http
      DISTANCE_UNIT: km
      PHOTON_API_HOST: photon.komoot.io
      PHOTON_API_USE_HTTPS: true
      MIN_MINUTES_SPENT_IN_CITY: 60
      APPLICATION_HOST: localhost

Link to the https://dawarich.app/docs/environment-variables-and-settings page added instead, and the app itself is now using defaults that can be changed if env vars are provided.

@tohn
Copy link

tohn commented Dec 2, 2024

I would also suggest to remove some duplicate environment variables by using env_file. To overwrite PROMETHEUS_EXPORTER_ENABLED and PROMETHEUS_EXPORTER_HOST in dawarich_sidekiq, only these two variables could be included in an environment section (see also https://docs.docker.com/compose/how-tos/environment-variables/envvars-precedence/).

Maybe also DATABASE_USERNAME and DATABASE_PASSWORD could be used in dawarich_db instead of POSTGRES_USER and POSTGRES_PASSWORD.

One sample env_file (which could also include docs/defaults):

POSTGRES_USER=postgres
POSTGRES_PASSWORD=password
RAILS_ENV=development
REDIS_URL=redis://dawarich_redis:6379/0
DATABASE_HOST=dawarich_db
DATABASE_USERNAME=postgres
DATABASE_PASSWORD=password
DATABASE_NAME=dawarich_development
MIN_MINUTES_SPENT_IN_CITY=60
APPLICATION_HOST=localhost
APPLICATION_HOSTS=localhost
TIME_ZONE=Europe/London
APPLICATION_PROTOCOL=http
DISTANCE_UNIT=km
REVERSE_GEOCODING_ENABLED=false
PHOTON_API_HOST=photon.komoot.io
PHOTON_API_USE_HTTPS=true
PROMETHEUS_EXPORTER_ENABLED=false
PROMETHEUS_EXPORTER_HOST=0.0.0.0
PROMETHEUS_EXPORTER_PORT=9394
BACKGROUND_PROCESSING_CONCURRENCY=10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants