modify(dbs-postgres): modify posrgres stack

This commit is contained in:
GengY 2024-03-05 10:22:33 +08:00
parent 62c61ac4ac
commit 2b1c68b2d5
4 changed files with 46 additions and 21 deletions

View File

@ -1,3 +1,5 @@
#IMAGE_TAG=postgres:14.11-bookworm
#IMAGE_TAG=postgres:15.6-bookworm
IMAGE_TAG=postgres:16.2-bookworm
IMAGE_TAG=postgres:16.2-bookworm
POSTGRES_PASSWORD=Kevin0412PgSql
POSTGRES_HOST_AUTH_METHOD=scram-sha-256

View File

@ -0,0 +1,20 @@
#mkdir -pv /data/volumes/postgres/data
#pull:: docker compose --env-file ./dev-dbs/postgres/env.cfg -f ./dev-dbs/postgres/prod.stack.yml pull
#run:: docker compose -p prod-dbs --env-file ./dev-dbs/postgres/env.cfg -f ./dev-dbs/postgres/prod.stack.yml up -d
services:
postgres:
image: ${IMAGE_TAG}
container_name: prod-postgre
restart: always
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_HOST_AUTH_METHOD=${POSTGRES_HOST_AUTH_METHOD}
- POSTGRES_INITDB_ARGS=--auth-host==${POSTGRES_HOST_AUTH_METHOD}
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- TZ=Asia/Shanghai
volumes:
- /data/volumes/postgres/data:/var/lib/postgresql/data
ports:
- "5432:5432"

View File

@ -1,20 +0,0 @@
#pull:: docker compose --env-file ./dev-dbs/postgres/env.cfg -f ./dev-dbs/postgres/stack.yml pull
#run:: docker compose -p dev-dbs --env-file ./dev-dbs/postgres/env.cfg -f ./dev-dbs/postgres/stack.yml up -d
services:
postgres:
image: ${IMAGE_TAG}
container_name: Dev-postgre
restart: always
environment:
- POSTGRES_PASSWORD=Kevin0412PgSql
- POSTGRES_HOST_AUTH_METHOD=scram-sha-256
- POSTGRES_INITDB_ARGS=--auth-host=scram-sha-256
- TZ=Asia/Shanghai
volumes:
- postgresql_data:/var/lib/postgresql/data
ports:
- "5432:5432"
volumes:
postgresql_data:

View File

@ -0,0 +1,23 @@
#pull:: docker compose --env-file ./dev-dbs/postgres/env.cfg -f ./dev-dbs/postgres/test.stack.yml pull
#run:: docker compose -p test-dbs --env-file ./dev-dbs/postgres/env.cfg -f ./dev-dbs/postgres/test.stack.yml up -d
services:
postgres:
image: ${IMAGE_TAG}
container_name: prod-postgre
restart: always
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_HOST_AUTH_METHOD=${POSTGRES_HOST_AUTH_METHOD}
- POSTGRES_INITDB_ARGS=--auth-host==${POSTGRES_HOST_AUTH_METHOD}
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- TZ=Asia/Shanghai
volumes:
- data:/var/lib/postgresql/data
ports:
- "5432:5432"
volumes:
data: