diff --git a/CHANGES/468.bugfix b/CHANGES/468.bugfix new file mode 100644 index 00000000..421d7662 --- /dev/null +++ b/CHANGES/468.bugfix @@ -0,0 +1 @@ +Fix the postgresql database not being preserved for docker-compose. diff --git a/images/compose/README.md b/images/compose/README.md index befc7f7b..70e933bf 100644 --- a/images/compose/README.md +++ b/images/compose/README.md @@ -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 ``` @@ -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 ``` diff --git a/images/compose/docker-compose.folders.yml b/images/compose/docker-compose.folders.yml index 39c76d6f..181776bf 100644 --- a/images/compose/docker-compose.folders.yml +++ b/images/compose/docker-compose.folders.yml @@ -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: diff --git a/images/compose/docker-compose.yml b/images/compose/docker-compose.yml index 028e4ac0..c04a5fff 100644 --- a/images/compose/docker-compose.yml +++ b/images/compose/docker-compose.yml @@ -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