modify(directory): directory modify

This commit is contained in:
GengY
2024-03-05 10:25:33 +08:00
parent 2b1c68b2d5
commit 5d80a9e021
16 changed files with 13 additions and 12 deletions

5
dbSer/postgres/env.cfg Normal file
View File

@@ -0,0 +1,5 @@
#IMAGE_TAG=postgres:14.11-bookworm
#IMAGE_TAG=postgres:15.6-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 ./dbSer/postgres/env.cfg -f ./dbSer/postgres/prod.stack.yml pull
#run:: docker compose -p prod-dbs --env-file ./dbSer/postgres/env.cfg -f ./dbSer/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

@@ -0,0 +1,23 @@
#pull:: docker compose --env-file ./dbSer/postgres/env.cfg -f ./dbSer/postgres/test.stack.yml pull
#run:: docker compose -p test-dbs --env-file ./dbSer/postgres/env.cfg -f ./dbSer/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: