Skip to content

Commit 835a66b

Browse files
committed
chore: change mount path to work with postgres:18
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
1 parent 0e92efc commit 835a66b

File tree

16 files changed

+28
-28
lines changed

16 files changed

+28
-28
lines changed

content/get-started/docker-concepts/running-containers/persisting-container-data.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Volumes have their own lifecycle beyond that of containers and can grow quite la
5353

5454
## Try it out
5555

56-
In this guide, you’ll practice creating and using volumes to persist data created by a Postgres container. When the database runs, it stores files into the `/var/lib/postgresql/data` directory. By attaching the volume here, you will be able to restart the container multiple times while keeping the data.
56+
In this guide, you’ll practice creating and using volumes to persist data created by a Postgres container. When the database runs, it stores files into the `/var/lib/postgresql` directory. By attaching the volume here, you will be able to restart the container multiple times while keeping the data.
5757

5858
### Use volumes
5959

@@ -62,7 +62,7 @@ In this guide, you’ll practice creating and using volumes to persist data crea
6262
2. Start a container using the [Postgres image](https://hub.docker.com/_/postgres) with the following command:
6363

6464
```console
65-
$ docker run --name=db -e POSTGRES_PASSWORD=secret -d -v postgres_data:/var/lib/postgresql/data postgres
65+
$ docker run --name=db -e POSTGRES_PASSWORD=secret -d -v postgres_data:/var/lib/postgresql postgres
6666
```
6767

6868
This will start the database in the background, configure it with a password, and attach a volume to the directory PostgreSQL will persist the database files.
@@ -115,7 +115,7 @@ In this guide, you’ll practice creating and using volumes to persist data crea
115115
8. Start a new container by running the following command, attaching the same volume with the persisted data:
116116

117117
```console
118-
$ docker run --name=new-db -d -v postgres_data:/var/lib/postgresql/data postgres
118+
$ docker run --name=new-db -d -v postgres_data:/var/lib/postgresql postgres
119119
```
120120

121121
You might have noticed that the `POSTGRES_PASSWORD` environment variable has been omitted. That’s because that variable is only used when bootstrapping a new database.

content/guides/dotnet/develop.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ services:
103103
secrets:
104104
- db-password
105105
volumes:
106-
- db-data:/var/lib/postgresql/data
106+
- db-data:/var/lib/postgresql
107107
environment:
108108
- POSTGRES_DB=example
109109
- POSTGRES_PASSWORD_FILE=/run/secrets/db-password
@@ -256,7 +256,7 @@ services:
256256
secrets:
257257
- db-password
258258
volumes:
259-
- db-data:/var/lib/postgresql/data
259+
- db-data:/var/lib/postgresql
260260
environment:
261261
- POSTGRES_DB=example
262262
- POSTGRES_PASSWORD_FILE=/run/secrets/db-password
@@ -361,7 +361,7 @@ services:
361361
secrets:
362362
- db-password
363363
volumes:
364-
- db-data:/var/lib/postgresql/data
364+
- db-data:/var/lib/postgresql
365365
environment:
366366
- POSTGRES_DB=example
367367
- POSTGRES_PASSWORD_FILE=/run/secrets/db-password

content/guides/frameworks/laravel/development-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ services:
293293
- POSTGRES_USER=laravel
294294
- POSTGRES_PASSWORD=secret
295295
volumes:
296-
- postgres-data-development:/var/lib/postgresql/data
296+
- postgres-data-development:/var/lib/postgresql
297297
networks:
298298
- laravel-development
299299

content/guides/frameworks/laravel/production-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ services:
381381
- POSTGRES_USER=${POSTGRES_USERNAME}
382382
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
383383
volumes:
384-
- postgres-data-production:/var/lib/postgresql/data
384+
- postgres-data-production:/var/lib/postgresql
385385
networks:
386386
- laravel-production
387387
# Health check for PostgreSQL

content/guides/genai-claude-code-mcp/claude-code-mcp-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ services:
233233
POSTGRES_PASSWORD: example
234234
POSTGRES_DB: appdb
235235
volumes:
236-
- db-data:/var/lib/postgresql/data
236+
- db-data:/var/lib/postgresql
237237
ports:
238238
- "5432:5432"
239239
networks:

content/guides/java/containerize.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ services:
215215
# secrets:
216216
# - db-password
217217
# volumes:
218-
# - db-data:/var/lib/postgresql/data
218+
# - db-data:/var/lib/postgresql
219219
# environment:
220220
# - POSTGRES_DB=example
221221
# - POSTGRES_PASSWORD_FILE=/run/secrets/db-password

content/guides/java/develop.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ services:
6565
image: postgres
6666
restart: always
6767
volumes:
68-
- db-data:/var/lib/postgresql/data
68+
- db-data:/var/lib/postgresql
6969
environment:
7070
- POSTGRES_DB=petclinic
7171
- POSTGRES_USER=petclinic
@@ -196,7 +196,7 @@ services:
196196
image: postgres
197197
restart: always
198198
volumes:
199-
- db-data:/var/lib/postgresql/data
199+
- db-data:/var/lib/postgresql
200200
environment:
201201
- POSTGRES_DB=petclinic
202202
- POSTGRES_USER=petclinic
@@ -348,7 +348,7 @@ services:
348348
image: postgres
349349
restart: always
350350
volumes:
351-
- db-data:/var/lib/postgresql/data
351+
- db-data:/var/lib/postgresql
352352
environment:
353353
- POSTGRES_DB=petclinic
354354
- POSTGRES_USER=petclinic

content/guides/nodejs/containerize.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ services:
217217
POSTGRES_USER: '${POSTGRES_USER:-todoapp}'
218218
POSTGRES_PASSWORD: '${POSTGRES_PASSWORD:-todoapp_password}'
219219
volumes:
220-
- postgres_data:/var/lib/postgresql/data
220+
- postgres_data:/var/lib/postgresql
221221
ports:
222222
- '${DB_PORT:-5432}:5432'
223223
restart: unless-stopped

content/guides/nodejs/deploy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ spec:
134134
key: postgres-password
135135
volumeMounts:
136136
- name: postgres-storage
137-
mountPath: /var/lib/postgresql/data
137+
mountPath: /var/lib/postgresql
138138
livenessProbe:
139139
exec:
140140
command:

content/guides/nodejs/develop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ services:
4545
POSTGRES_USER: '${POSTGRES_USER:-todoapp}'
4646
POSTGRES_PASSWORD: '${POSTGRES_PASSWORD:-todoapp_password}'
4747
volumes:
48-
- postgres_data:/var/lib/postgresql/data
48+
- postgres_data:/var/lib/postgresql
4949
ports:
5050
- '${DB_PORT:-5432}:5432'
5151
restart: unless-stopped
@@ -140,7 +140,7 @@ services:
140140
POSTGRES_USER: '${POSTGRES_USER:-todoapp}'
141141
POSTGRES_PASSWORD: '${POSTGRES_PASSWORD:-todoapp_password}'
142142
volumes:
143-
- postgres_data:/var/lib/postgresql/data
143+
- postgres_data:/var/lib/postgresql
144144
ports:
145145
- '${DB_PORT:-5432}:5432'
146146
restart: unless-stopped

0 commit comments

Comments
 (0)