modify(dbs-postgres): modify posrgres stack
This commit is contained in:
parent
62c61ac4ac
commit
2b1c68b2d5
@ -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
|
20
dev-dbs/postgres/prod.stack.yml
Normal file
20
dev-dbs/postgres/prod.stack.yml
Normal 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"
|
@ -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:
|
23
dev-dbs/postgres/test.stack.yml
Normal file
23
dev-dbs/postgres/test.stack.yml
Normal 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:
|
Loading…
x
Reference in New Issue
Block a user