Skip to content

Commit

Permalink
Fix the postgresql database not being preserved
Browse files Browse the repository at this point in the history
for docker-compose.

fixes: #468
  • Loading branch information
mikedep333 committed May 5, 2023
1 parent 88c7f29 commit b2c1198
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES/468.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix the postgresql database not being preserved for docker-compose.
4 changes: 2 additions & 2 deletions images/compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ docker-compose scale pulp_api=4 pulp_content=4
pip install podman-compose
git clone git@github.com:pulp/pulp-oci-images.git
cd images/compose
mkdir ../../pgsql ../../pulp_storage
mkdir -p ../../pgsql/data ../../pulp_storage
podman unshare chown 700:700 ../../pulp_storage
podman-compose -f docker-compose.folders.yml up
```
Expand All @@ -39,7 +39,7 @@ podman-compose -f docker-compose.folders.yml up
pip install podman-compose
git clone git@github.com:pulp/pulp-oci-images.git
cd images/compose
mkdir ../../pgsql ../../pulp_storage
mkdir -p ../../pgsql/data ../../pulp_storage
sudo chown 700:700 ../../pulp_storage
podman-compose -f docker-compose.folders.yml up
```
2 changes: 1 addition & 1 deletion images/compose/docker-compose.folders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
POSTGRES_INITDB_ARGS: '--auth-host=scram-sha-256'
POSTGRES_HOST_AUTH_METHOD: 'scram-sha-256'
volumes:
- "../../pgsql:/var/lib/postgresql:Z"
- "../../pgsql/data:/var/lib/postgresql/data:Z"
- "./assets/postgres/passwd:/etc/passwd:Z"

redis:
Expand Down
2 changes: 1 addition & 1 deletion images/compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
POSTGRES_INITDB_ARGS: '--auth-host=scram-sha-256'
POSTGRES_HOST_AUTH_METHOD: 'scram-sha-256'
volumes:
- "pg_data:/var/lib/postgresql"
- "pg_data:/var/lib/postgresql/data"
- "./assets/postgres/passwd:/etc/passwd:Z"
restart: always

Expand Down

0 comments on commit b2c1198

Please sign in to comment.