mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-09 18:18:11 -05:00
Change default PostgreSQL image to Postgis
This commit is contained in:
@@ -327,7 +327,7 @@ To mount a custom `postgresql.conf` file, you need to create a `postgresql.conf`
|
||||
|
||||
```diff
|
||||
dawarich_db:
|
||||
image: postgres:14.2-alpine
|
||||
image: postgis/postgis:14-3.5-alpine
|
||||
shm_size: 1G
|
||||
container_name: dawarich_db
|
||||
volumes:
|
||||
@@ -358,7 +358,7 @@ An example of a custom `postgresql.conf` file is provided in the `postgresql.con
|
||||
```diff
|
||||
...
|
||||
dawarich_db:
|
||||
image: postgres:14.2-alpine
|
||||
image: postgis/postgis:14-3.5-alpine
|
||||
+ shm_size: 1G
|
||||
...
|
||||
```
|
||||
@@ -1299,7 +1299,7 @@ deploy:
|
||||
- shared_data:/var/shared/redis
|
||||
+ restart: always
|
||||
dawarich_db:
|
||||
image: postgres:14.2-alpine
|
||||
image: postgis/postgis:14-3.5-alpine
|
||||
container_name: dawarich_db
|
||||
volumes:
|
||||
- db_data:/var/lib/postgresql/data
|
||||
|
||||
@@ -17,7 +17,7 @@ services:
|
||||
start_period: 30s
|
||||
timeout: 10s
|
||||
dawarich_db:
|
||||
image: postgres:17-alpine
|
||||
image: postgres:17-alpine # TODO: Use postgis here
|
||||
shm_size: 1G
|
||||
container_name: dawarich_db
|
||||
volumes:
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
networks:
|
||||
dawarich:
|
||||
|
||||
|
||||
volumes:
|
||||
dawarich_public:
|
||||
name: dawarich_public
|
||||
dawarich_keydb:
|
||||
name: dawarich_keydb
|
||||
dawarich_shared:
|
||||
name: dawarich_shared
|
||||
watched:
|
||||
name: dawarich_watched
|
||||
|
||||
services:
|
||||
app:
|
||||
container_name: dawarich_app
|
||||
image: freikin/dawarich:latest
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
restart: true
|
||||
keydb:
|
||||
condition: service_healthy
|
||||
restart: true
|
||||
networks:
|
||||
- dawarich
|
||||
ports:
|
||||
- 3000:3000
|
||||
environment:
|
||||
TIME_ZONE: Europe/London
|
||||
RAILS_ENV: development
|
||||
REDIS_URL: redis://keydb:6379/0
|
||||
DATABASE_HOST: db
|
||||
DATABASE_USERNAME: postgres
|
||||
DATABASE_PASSWORD: password
|
||||
DATABASE_NAME: dawarich_development
|
||||
MIN_MINUTES_SPENT_IN_CITY: 60
|
||||
APPLICATION_HOSTS: localhost
|
||||
APPLICATION_PROTOCOL: http
|
||||
DISTANCE_UNIT: km
|
||||
stdin_open: true
|
||||
tty: true
|
||||
entrypoint: dev-entrypoint.sh
|
||||
command: [ 'bin/dev' ]
|
||||
volumes:
|
||||
- dawarich_public:/var/app/dawarich_public
|
||||
- watched:/var/app/tmp/imports/watched
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "wget -qO - http://127.0.0.1:3000/api/v1/health | grep -q '\"status\"\\s*:\\s*\"ok\"'" ]
|
||||
start_period: 60s
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "5"
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.50' # Limit CPU usage to 50% of one core
|
||||
memory: '2G' # Limit memory usage to 2GB
|
||||
|
||||
sidekiq:
|
||||
container_name: dawarich_sidekiq
|
||||
hostname: sidekiq
|
||||
image: freikin/dawarich:latest
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
app:
|
||||
condition: service_healthy
|
||||
restart: true
|
||||
db:
|
||||
condition: service_healthy
|
||||
restart: true
|
||||
keydb:
|
||||
condition: service_healthy
|
||||
restart: true
|
||||
networks:
|
||||
- dawarich
|
||||
environment:
|
||||
RAILS_ENV: development
|
||||
REDIS_URL: redis://keydb:6379/0
|
||||
DATABASE_HOST: db
|
||||
DATABASE_USERNAME: postgres
|
||||
DATABASE_PASSWORD: password
|
||||
DATABASE_NAME: dawarich_development
|
||||
APPLICATION_HOSTS: localhost
|
||||
BACKGROUND_PROCESSING_CONCURRENCY: 10
|
||||
APPLICATION_PROTOCOL: http
|
||||
DISTANCE_UNIT: km
|
||||
stdin_open: true
|
||||
tty: true
|
||||
entrypoint: dev-entrypoint.sh
|
||||
command: [ 'sidekiq' ]
|
||||
volumes:
|
||||
- dawarich_public:/var/app/dawarich_public
|
||||
- watched:/var/app/tmp/imports/watched
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "100m"
|
||||
max-file: "5"
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "bundle exec sidekiqmon processes | grep $${HOSTNAME}" ]
|
||||
interval: 10s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
timeout: 10s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.50' # Limit CPU usage to 50% of one core
|
||||
memory: '2G' # Limit memory usage to 2GB
|
||||
|
||||
keydb:
|
||||
container_name: dawarich-keydb
|
||||
image: eqalpha/keydb:x86_64_v6.3.4
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- dawarich
|
||||
environment:
|
||||
- TZ=Europe/London
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
command: keydb-server /etc/keydb/keydb.conf --appendonly yes --server-threads 4 --active-replica no
|
||||
volumes:
|
||||
- dawarich_keydb:/data
|
||||
- dawarich_shared:/var/shared/redis
|
||||
healthcheck:
|
||||
test: [ "CMD", "keydb-cli", "ping" ]
|
||||
start_period: 60s
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
db:
|
||||
container_name: dawarich-db
|
||||
hostname: db
|
||||
image: postgres:16.4-alpine3.20
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- dawarich
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DATABASE: dawarich
|
||||
volumes:
|
||||
- ./db:/var/lib/postgresql/data
|
||||
- dawarich_shared:/var/shared
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "pg_isready -q -d $${POSTGRES_DATABASE} -U $${POSTGRES_USER} -h localhost" ]
|
||||
start_period: 60s
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
@@ -10,7 +10,7 @@ services:
|
||||
- ./redis:/var/shared/redis
|
||||
|
||||
dawarich_db:
|
||||
image: postgres:14.2-alpine
|
||||
image: postgis/postgis:14-3.5-alpine
|
||||
container_name: dawarich_db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
|
||||
Reference in New Issue
Block a user