forked from DevOps/deploy.stack
fix(memos): correct postgres volume and env setup
This commit is contained in:
@@ -17,5 +17,5 @@ PGSQL_IMAGE_TAG=postgres:18.4
|
|||||||
|
|
||||||
# ---------- 数据卷 ----------
|
# ---------- 数据卷 ----------
|
||||||
# 宿主机持久化目录,会挂载到容器 /var/opt/memos
|
# 宿主机持久化目录,会挂载到容器 /var/opt/memos
|
||||||
# 部署前手动创建:mkdir -pv /data/volumes/memos/data
|
# 部署前手动创建:mkdir -pv /data/volumes/memos/{data,pgsql_data}
|
||||||
Volumes_Path=/data/volumes/memos
|
Volumes_Path=/data/volumes/memos
|
||||||
|
|||||||
@@ -28,11 +28,12 @@ services:
|
|||||||
- POSTGRES_HOST_AUTH_METHOD=scram-sha-256
|
- POSTGRES_HOST_AUTH_METHOD=scram-sha-256
|
||||||
- TZ=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
volumes:
|
volumes:
|
||||||
|
# Postgres 数据持久化(具名卷 pgsql_data)
|
||||||
- pgsql_data:/var/lib/postgresql/data
|
- pgsql_data:/var/lib/postgresql/data
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
ports:
|
ports:
|
||||||
- "${PGSQL_PORT:-15432}:5432"
|
- "${DB_POST:-15432}:5432"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test:
|
test:
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# pull:: docker compose -p memos --env-file ./memos/env.cfg -f ./memos/prod.stack.yml pull
|
# pull:: docker compose -p memos --env-file ./memos/env.cfg -f ./memos/prod.stack.yml pull
|
||||||
# run-61:: docker compose -p memos --env-file ./memos/env.cfg --env-file ./memos/db-61.cnf -f ./memos/prod.stack.yml up -d
|
# run-61:: docker compose -p memos --env-file ./memos/env.cfg --env-file ./memos/db-61.cnf -f ./memos/prod.stack.yml up -d
|
||||||
# run-184:: docker compose -p memos --env-file ./memos/env.cfg --env-file ./memos/db-184.cnf -f ./memos/prod.stack.yml up -d
|
# run-184:: docker compose -p memos --env-file ./memos/env.cfg --env-file ./memos/db-184.cnf -f ./memos/prod.stack.yml up -d
|
||||||
# run-lkc:: docker compose -p memos --env-file ./memos/env.cfg --env-file ./memos/env-lkc.cnf -f ./memos/prod.stack.yml up -d
|
# run-lkc:: docker compose -p memos --env-file ./memos/env.cfg --env-file ./memos/db-lkc.cnf -f ./memos/prod.stack.yml up -d
|
||||||
# run-local:: docker compose -p memos --env-file ./memos/env.cfg --env-file ./memos/db-local.cnf -f ./memos/prod.stack.yml up -d
|
# run-local:: docker compose -p memos --env-file ./memos/env.cfg --env-file ./memos/db-local.cnf -f ./memos/prod.stack.yml up -d
|
||||||
|
|
||||||
services:
|
services:
|
||||||
@@ -36,7 +36,7 @@ services:
|
|||||||
- POSTGRES_HOST_AUTH_METHOD=scram-sha-256
|
- POSTGRES_HOST_AUTH_METHOD=scram-sha-256
|
||||||
- TZ=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
volumes:
|
volumes:
|
||||||
- pgsql_data:/var/lib/postgresql/data
|
- ${Volumes_Path}/pgsql_data:/var/lib/postgresql/data
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
Reference in New Issue
Block a user