2022-04-06 14:46:10 -04:00
|
|
|
networks:
|
2024-03-15 18:45:48 -04:00
|
|
|
dawarich:
|
2022-04-06 14:46:10 -04: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:
|
|
|
|
|
- dawarich_shared:/data
|
|
|
|
|
restart: always
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
|
|
|
|
|
interval: 10s
|
|
|
|
|
retries: 5
|
|
|
|
|
start_period: 30s
|
|
|
|
|
timeout: 10s
|
2024-03-15 18:31:47 -04:00
|
|
|
dawarich_db:
|
2025-05-08 06:47:53 -04:00
|
|
|
image: postgis/postgis:17-3.5-alpine
|
2024-12-20 10:27:16 -05:00
|
|
|
shm_size: 1G
|
2024-03-15 18:31:47 -04:00
|
|
|
container_name: dawarich_db
|
2022-04-06 14:46:10 -04:00
|
|
|
volumes:
|
2024-11-30 06:18:18 -05:00
|
|
|
- dawarich_db_data:/var/lib/postgresql/data
|
|
|
|
|
- dawarich_shared:/var/shared
|
2024-12-24 10:50:53 -05:00
|
|
|
# - ./postgresql.conf:/etc/postgresql/postgresql.conf # Optional, uncomment if you want to use a custom config
|
2022-04-06 14:46:10 -04:00
|
|
|
networks:
|
2024-03-15 18:45:48 -04:00
|
|
|
- dawarich
|
2022-04-06 14:46:10 -04:00
|
|
|
environment:
|
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
|
POSTGRES_PASSWORD: password
|
2025-05-14 16:38:37 -04:00
|
|
|
POSTGRES_DB: dawarich_development
|
2024-08-16 07:01:39 -04:00
|
|
|
restart: always
|
2024-10-14 14:42:18 -04:00
|
|
|
healthcheck:
|
|
|
|
|
test: [ "CMD-SHELL", "pg_isready -U postgres -d dawarich_development" ]
|
|
|
|
|
interval: 10s
|
|
|
|
|
retries: 5
|
|
|
|
|
start_period: 30s
|
|
|
|
|
timeout: 10s
|
2024-12-24 10:50:53 -05:00
|
|
|
# command: postgres -c config_file=/etc/postgresql/postgresql.conf # Use custom config, uncomment if you want to use a custom config
|
2024-03-15 18:31:47 -04:00
|
|
|
dawarich_app:
|
2025-01-09 09:15:56 -05:00
|
|
|
image: freikin/dawarich:latest
|
2024-03-15 18:31:47 -04:00
|
|
|
container_name: dawarich_app
|
2022-04-06 14:46:10 -04:00
|
|
|
volumes:
|
2024-11-30 06:18:18 -05:00
|
|
|
- dawarich_public:/var/app/public
|
|
|
|
|
- dawarich_watched:/var/app/tmp/imports/watched
|
2025-04-03 12:41:05 -04:00
|
|
|
- dawarich_storage:/var/app/storage
|
2025-05-31 13:54:12 -04:00
|
|
|
- dawarich_db_data:/dawarich_db_data
|
2025-06-08 06:34:41 -04:00
|
|
|
- dawarich_sqlite_data:/dawarich_sqlite_data
|
2022-04-06 14:46:10 -04:00
|
|
|
networks:
|
2024-03-15 18:45:48 -04:00
|
|
|
- dawarich
|
2022-04-06 14:46:10 -04:00
|
|
|
ports:
|
|
|
|
|
- 3000:3000
|
2024-11-20 15:05:02 -05:00
|
|
|
# - 9394:9394 # Prometheus exporter, uncomment if needed
|
2022-04-06 14:46:10 -04:00
|
|
|
stdin_open: true
|
|
|
|
|
tty: true
|
2025-01-09 08:44:16 -05:00
|
|
|
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
|
2022-04-06 14:46:10 -04:00
|
|
|
environment:
|
|
|
|
|
RAILS_ENV: development
|
2025-06-09 07:39:25 -04:00
|
|
|
REDIS_URL: redis://dawarich_redis:6379/0
|
2024-03-15 18:31:47 -04:00
|
|
|
DATABASE_HOST: dawarich_db
|
2024-03-15 18:31:06 -04:00
|
|
|
DATABASE_USERNAME: postgres
|
|
|
|
|
DATABASE_PASSWORD: password
|
2024-03-15 18:31:47 -04:00
|
|
|
DATABASE_NAME: dawarich_development
|
2024-05-05 06:03:25 -04:00
|
|
|
MIN_MINUTES_SPENT_IN_CITY: 60
|
2024-07-08 12:05:02 -04:00
|
|
|
APPLICATION_HOSTS: localhost
|
2024-06-08 16:41:33 -04:00
|
|
|
TIME_ZONE: Europe/London
|
2024-07-08 12:05:02 -04:00
|
|
|
APPLICATION_PROTOCOL: http
|
2024-11-20 16:03:29 -05:00
|
|
|
PROMETHEUS_EXPORTER_ENABLED: false
|
2024-11-20 15:05:02 -05:00
|
|
|
PROMETHEUS_EXPORTER_HOST: 0.0.0.0
|
2024-11-20 14:42:28 -05:00
|
|
|
PROMETHEUS_EXPORTER_PORT: 9394
|
2025-04-06 15:37:37 -04:00
|
|
|
SELF_HOSTED: "true"
|
2025-05-15 15:33:01 -04:00
|
|
|
STORE_GEODATA: "true"
|
2024-07-09 14:09:43 -04:00
|
|
|
logging:
|
|
|
|
|
driver: "json-file"
|
|
|
|
|
options:
|
|
|
|
|
max-size: "100m"
|
|
|
|
|
max-file: "5"
|
2024-10-14 14:42:18 -04:00
|
|
|
healthcheck:
|
|
|
|
|
test: [ "CMD-SHELL", "wget -qO - http://127.0.0.1:3000/api/v1/health | grep -q '\"status\"\\s*:\\s*\"ok\"'" ]
|
|
|
|
|
interval: 10s
|
2024-11-20 18:47:27 -05:00
|
|
|
retries: 30
|
2024-10-14 14:42:18 -04:00
|
|
|
start_period: 30s
|
|
|
|
|
timeout: 10s
|
2022-04-06 14:46:10 -04:00
|
|
|
depends_on:
|
2024-10-14 14:44:24 -04:00
|
|
|
dawarich_db:
|
2024-10-14 14:42:18 -04:00
|
|
|
condition: service_healthy
|
|
|
|
|
restart: true
|
2025-06-09 07:39:25 -04:00
|
|
|
dawarich_redis:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
restart: true
|
2024-09-02 12:28:17 -04:00
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
cpus: '0.50' # Limit CPU usage to 50% of one core
|
2025-01-09 09:04:05 -05:00
|
|
|
memory: '4G' # Limit memory usage to 4GB
|
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:
|
|
|
|
|
RAILS_ENV: development
|
|
|
|
|
REDIS_URL: redis://dawarich_redis:6379/0
|
|
|
|
|
DATABASE_HOST: dawarich_db
|
|
|
|
|
DATABASE_USERNAME: postgres
|
|
|
|
|
DATABASE_PASSWORD: password
|
|
|
|
|
DATABASE_NAME: dawarich_development
|
|
|
|
|
APPLICATION_HOSTS: localhost
|
|
|
|
|
BACKGROUND_PROCESSING_CONCURRENCY: 10
|
|
|
|
|
APPLICATION_PROTOCOL: http
|
|
|
|
|
PROMETHEUS_EXPORTER_ENABLED: false
|
|
|
|
|
PROMETHEUS_EXPORTER_HOST: dawarich_app
|
|
|
|
|
PROMETHEUS_EXPORTER_PORT: 9394
|
|
|
|
|
SELF_HOSTED: "true"
|
|
|
|
|
STORE_GEODATA: "true"
|
|
|
|
|
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
|
2024-03-15 18:31:06 -04:00
|
|
|
volumes:
|
2024-11-30 06:18:18 -05:00
|
|
|
dawarich_db_data:
|
2025-06-08 06:34:41 -04:00
|
|
|
dawarich_sqlite_data:
|
2024-11-30 06:18:18 -05:00
|
|
|
dawarich_shared:
|
|
|
|
|
dawarich_public:
|
|
|
|
|
dawarich_watched:
|
2025-04-03 12:41:05 -04:00
|
|
|
dawarich_storage:
|