Skip to content

Commit b77d143

Browse files
author
lishiwen
committed
docs: add docker-compose.guide.yml file usage instructions
1 parent 914e64e commit b77d143

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.env

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
POSTGRES_USER=postgres
2+
POSTGRES_PASSWORD=postgres
3+
POSTGRES_DB=petappdb

docker-compose.guide.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ services:
178178
nofile:
179179
soft: 20000
180180
hard: 40000
181-
volumes: # 将主机的数据卷或着文件挂载到容器里
181+
volumes: # 将主机的数据卷或着文件挂载到容器里;
182+
# 默认情况下数据将仅在容器中, 如果您决定删除容器,所有数据都将彻底消失
183+
# 为了持久化数据,我们将使用 Docker 卷。它将与您计算机的本地文件夹共享容器内的数据库日期。这意味着每次您重新构建 Postgres Docker Compose 时,这些相同的数据都将用于当前项目
182184
- "/localhost/postgres.sock:/var/run/postgres/postgres.sock"
183185
- "/localhost/data:/var/lib/postgresql/data"
184186

0 commit comments

Comments
 (0)