From d044143aa11d58cab23d0734c88d830e009b2fd5 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 12 Aug 2025 10:10:19 +0100 Subject: [PATCH] correctly bind and document postgress data folder bind (#298) --- .gitignore | 1 + backend/README.md | 11 ++++++++++- docker-compose.yml | 4 +--- 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..adbb97d2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +data/ \ No newline at end of file diff --git a/backend/README.md b/backend/README.md index 7d280167..94039570 100644 --- a/backend/README.md +++ b/backend/README.md @@ -13,4 +13,13 @@ npx directus-sync push \ --directus-url http://localhost:8055 \ --directus-email admin@it4c.dev \ --directus-password admin123 -``` \ No newline at end of file +``` + +## Access Data on local drive + +In order to access the postgress data mounted to the local drive at `/data/database` you need to make it accessible (assuming you are not root): +``` +sudo chmod 777 -R ./data/ +``` + +This process is to be repeated whenever you restart the database docker container \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 13bca5b7..0caabd00 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,10 +9,8 @@ services: database: image: postgis/postgis:13-master - # Required when running on platform other than amd64, like Apple M1/M2: - # platform: linux/amd64 volumes: - - ./data/database:/var/lib/postgresql/data + - ./data/database:/var/lib/postgresql/data:rw environment: POSTGRES_USER: 'directus' POSTGRES_PASSWORD: 'directus'