Add shared postgres (wip)
This commit is contained in:
@@ -1,18 +1,27 @@
|
||||
services:
|
||||
postgres:
|
||||
image: ghcr.io/immich-app/postgres:17-vectorchord0.4.3-pgvectors0.3.0
|
||||
container_name: database
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_INITDB_ARGS: '--data-checksums --encoding=UTF-8 --locale=C'
|
||||
DB_STORAGE_TYPE: 'HDD'
|
||||
shared-postgres:
|
||||
image: ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0
|
||||
container_name: shared-postgres
|
||||
restart: always
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
POSTGRES_USER: ${SHARED_DB_USER}
|
||||
POSTGRES_PASSWORD: ${SHARED_DB_PASSWORD}
|
||||
POSTGRES_DB: ${SHARED_DB_DB} # Default database
|
||||
POSTGRES_INITDB_ARGS: '--encoding=UTF-8 --locale=C --data-checksums'
|
||||
volumes:
|
||||
- ${SHARED_DB_DATA_DIR}:/var/lib/postgresql/data
|
||||
- ./init-scripts:/docker-entrypoint-initdb.d:ro
|
||||
ports:
|
||||
- 5432:5432
|
||||
- "5431:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${SHARED_DB_USER}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- postgres
|
||||
- postgres-network
|
||||
|
||||
networks:
|
||||
postgres:
|
||||
postgres-network:
|
||||
name: postgres-network
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user