fix: require NFS nodes and mount Postgres pgdata
This commit is contained in:
@@ -70,8 +70,9 @@ services:
|
|||||||
replicas: 1
|
replicas: 1
|
||||||
placement:
|
placement:
|
||||||
constraints:
|
constraints:
|
||||||
# Keep the node-local proxcenter_data volume on the intended primary node.
|
# Only run on Swarm nodes where the shared Docker NFS mount is present
|
||||||
- node.platform.os == linux
|
# and verified writable by the required container UID/GID.
|
||||||
|
- node.labels.storage.nfs == true
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
delay: 5s
|
delay: 5s
|
||||||
@@ -100,7 +101,9 @@ services:
|
|||||||
- POSTGRES_DB=${POSTGRES_DB:-proxcenter}
|
- POSTGRES_DB=${POSTGRES_DB:-proxcenter}
|
||||||
- POSTGRES_INITDB_ARGS=--encoding=UTF8 --locale=C
|
- POSTGRES_INITDB_ARGS=--encoding=UTF8 --locale=C
|
||||||
volumes:
|
volumes:
|
||||||
- ${DockerData}/proxcenter/postgres_data:/var/lib/postgresql/data
|
# Mount the pre-created pgdata directory directly. This avoids Postgres
|
||||||
|
# needing to create/chmod a child directory on the NFS mount root.
|
||||||
|
- ${DockerData}/proxcenter/postgres_data/pgdata:/var/lib/postgresql/data
|
||||||
# Port is intentionally not published. Postgres is reachable only
|
# Port is intentionally not published. Postgres is reachable only
|
||||||
# over the internal overlay network. Uncomment to expose for debugging:
|
# over the internal overlay network. Uncomment to expose for debugging:
|
||||||
# ports:
|
# ports:
|
||||||
@@ -131,8 +134,9 @@ services:
|
|||||||
delay: 5s
|
delay: 5s
|
||||||
placement:
|
placement:
|
||||||
constraints:
|
constraints:
|
||||||
# Keep the node-local postgres_data volume on the intended primary node.
|
# Only run on Swarm nodes where the shared Docker NFS mount is present
|
||||||
- node.platform.os == linux
|
# and verified writable by the required container UID/GID.
|
||||||
|
- node.labels.storage.nfs == true
|
||||||
|
|
||||||
# ========================================
|
# ========================================
|
||||||
# Networks
|
# Networks
|
||||||
|
|||||||
Reference in New Issue
Block a user