Added Postgresql

This commit is contained in:
NetShade 2024-07-05 13:07:53 +02:00
parent 02519962a7
commit 7391d63f46
3 changed files with 98 additions and 0 deletions

View File

@ -15,6 +15,25 @@ services:
volumes:
- jellyfin:/config
- /data/media:/media
plex:
image: lscr.io/linuxserver/plex:latest
container_name: plex
network_mode: bridge
ports: ["32400:32400"]
environment:
- PUID=117
- PGID=101
- UMASK=002
- TZ=Europe/Stockholm
- VERSION=docker
- PLEX_CLAIM=claim-kV1j1aMNtz1idHqAjffW
volumes:
- plex:/config
- /data/media/tv:/tv
- /data/media/movies:/movies
- /data/media/music:/music
- /data/media/books:/books
restart: unless-stopped
airsonic-advanced:
image: lscr.io/linuxserver/airsonic-advanced:latest
container_name: airsonic-advanced
@ -43,6 +62,8 @@ services:
volumes:
jellyfin:
external: true
plex:
external: true
airsonic-config:
external: true
name: airsonic-config

Binary file not shown.

View File

@ -0,0 +1,77 @@
version: '3.3'
services:
primary:
hostname: 'primary'
image: crunchydata/crunchy-postgres:centos7-10.3-1.8.2
secrets:
- postgres_primary
- postgres_password
- postgres_rootpw
environment:
- PGHOST=/tmp
- MAX_CONNECTIONS=10
- MAX_WAL_SENDERS=5
- PG_MODE=primary
- PG_PRIMARY_USER=primaryuser
- PG_PRIMARY_PASSWORD=postgres_primary
- PG_DATABASE=postgres_db
- PG_USER=admin
- PG_PASSWORD=postgres_password
- PG_ROOT_PASSWORD=postgres_rootpw
- PG_PRIMARY_PORT=5432
volumes:
- pg-primary-vol:/pgdata
ports:
- '5432'
networks:
- infra
deploy:
placement:
constraints:
- node.labels.type == primary
- node.role == worker
replica:
image: crunchydata/crunchy-postgres:centos7-10.3-1.8.2
secrets:
- postgres_primary
- postgres_password
- postgres_rootpw
environment:
- PGHOST=/tmp
- MAX_CONNECTIONS=10
- MAX_WAL_SENDERS=5
- PG_MODE=replica
- PG_PRIMARY_HOST=primary
- PG_PRIMARY_PORT=5432
- PG_PRIMARY_USER=primaryuser
- PG_PRIMARY_PASSWORD=postgres_primary
- PG_DATABASE=postgres_db
- PG_USER=admin
- PG_PASSWORD=postgres_password
- PG_ROOT_PASSWORD=postgres_rootpw
volumes:
- pg-replica-vol:/pgdata
ports:
- '5432'
networks:
- infra
deploy:
placement:
constraints:
- node.labels.type != primary
- node.role == worker
networks:
infra:
volumes:
pg-primary-vol:
pg-replica-vol:
secrets:
postgres_primary:
external: true
postgres_password:
external: true
postgres_rootpw:
external: true