Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- networks:
- dawarich:
- services:
- dawarich_redis:
- image: redis:7.0-alpine
- container_name: dawarich_redis
- command: redis-server
- networks:
- - dawarich
- volumes:
- - ./dawarich_shared:/data
- restart: always
- healthcheck:
- test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
- interval: 10s
- retries: 5
- start_period: 30s
- timeout: 10s
- dawarich_db:
- image: postgres:14.2-alpine
- 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
- POSTGRES_PASSWORD: 'SECURE_PASSWORD_HERE'
- restart: always
- healthcheck:
- test: [ "CMD-SHELL", "pg_isready -U postgres -d dawarich_development" ]
- interval: 10s
- retries: 5
- start_period: 30s
- timeout: 10s
- dawarich_app:
- image: freikin/dawarich:latest
- container_name: dawarich_app
- volumes:
- - ./dawarich_gem_cache_app:/usr/local/bundle/gems
- - ./dawarich_public:/var/app/public
- - ./dawarich_watched:/var/app/tmp/imports/watched
- networks:
- - dawarich
- ports:
- - 3000:3000
- stdin_open: true
- tty: true
- entrypoint: dev-entrypoint.sh
- command: ['bin/dev']
- restart: on-failure
- environment:
- RAILS_ENV: development
- REDIS_URL: redis://dawarich_redis:6379/0
- DATABASE_HOST: dawarich_db
- DATABASE_USERNAME: postgres
- DATABASE_PASSWORD: 'SECURE_PASSWORD_HERE'
- DATABASE_NAME: dawarich_development
- MIN_MINUTES_SPENT_IN_CITY: 30
- APPLICATION_HOSTS: localhost, sub.domain.tld
- TIME_ZONE: Europe/Berlin
- APPLICATION_PROTOCOL: http
- DISTANCE_UNIT: km
- 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
- ENABLE_TELEMETRY: false
- 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.40' # Limit CPU usage to 40% of one core
- memory: '1G' # Limit memory usage to 1GB
- dawarich_sidekiq:
- image: freikin/dawarich:latest
- container_name: dawarich_sidekiq
- volumes:
- - ./dawarich_gem_cache_sidekiq:/usr/local/bundle/gems
- - ./dawarich_public:/var/app/public
- - ./dawarich_watched:/var/app/tmp/imports/watched
- networks:
- - dawarich
- stdin_open: true
- tty: true
- entrypoint: dev-entrypoint.sh
- command: ['sidekiq']
- restart: on-failure
- environment:
- RAILS_ENV: development
- REDIS_URL: redis://dawarich_redis:6379/0
- DATABASE_HOST: dawarich_db
- DATABASE_USERNAME: postgres
- DATABASE_PASSWORD: 'SECURE_PASSWORD_HERE'
- DATABASE_NAME: dawarich_development
- APPLICATION_HOST: localhost
- APPLICATION_HOSTS: localhost
- BACKGROUND_PROCESSING_CONCURRENCY: 10
- APPLICATION_PROTOCOL: http
- DISTANCE_UNIT: km
- PHOTON_API_HOST: photon.komoot.io
- PHOTON_API_USE_HTTPS: true
- PROMETHEUS_EXPORTER_ENABLED: false
- PROMETHEUS_EXPORTER_HOST: dawarich_app
- PROMETHEUS_EXPORTER_PORT: 9394
- ENABLE_TELEMETRY: false
- logging:
- driver: "json-file"
- options:
- max-size: "100m"
- max-file: "5"
- healthcheck:
- test: [ "CMD-SHELL", "bundle exec sidekiqmon processes | grep $${HOSTNAME}" ]
- 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
- deploy:
- resources:
- limits:
- cpus: '0.40' # Limit CPU usage to 40% of one core
- memory: '1G' # Limit memory usage to 1GB
- volumes:
- dawarich_db_data:
- dawarich_gem_cache_app:
- dawarich_gem_cache_sidekiq:
- dawarich_shared:
- dawarich_public:
- dawarich_watched:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement