From 1c06f6de29d031df4b8c62cc74fb4e0a6f0846aa Mon Sep 17 00:00:00 2001 From: Floatingghost Date: Sat, 1 Jun 2024 10:52:19 +0100 Subject: [PATCH] use z flag --- docker-compose.yml | 11 +++++------ docker-resources/generate-instance.sh | 5 +++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8a754acf6..896ff4e90 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,9 +15,8 @@ services: POSTGRES_PASSWORD: akkoma, } volumes: - - type: bind - source: ./pgdata - target: /var/lib/postgresql/data + - ./pgdata:/var/lib/postgresql/data:z + akkoma: image: akkoma/akkoma:next @@ -35,9 +34,9 @@ services: "127.0.0.1:4000:4000", ] volumes: - - ./config/prod.secret.exs:/etc/akkoma/config.exs - - ./uploads:/opt/akkoma/uploads - - ./instance:/opt/akkoma/instance + - ./config/prod.secret.exs:/etc/akkoma/config.exs:z + - ./uploads:/opt/akkoma/uploads:z + - ./instance:/opt/akkoma/instance:z # Copy this into docker-compose.override.yml and uncomment there if you want to use a reverse proxy #proxy: diff --git a/docker-resources/generate-instance.sh b/docker-resources/generate-instance.sh index a5fc6a018..373a559fa 100755 --- a/docker-resources/generate-instance.sh +++ b/docker-resources/generate-instance.sh @@ -4,14 +4,15 @@ set -euo pipefail mkdir -p pgdata mkdir -p docker-setup-tmp +chmod a+w docker-setup-tmp # This is sorta special in that we need the generated_config.exs to make it onto the host # We can also automate the DB setup here! docker compose run \ --rm \ -e "PLEROMA_CTL_RPC_DISABLED=true" \ - -v $(pwd)/docker-setup-tmp:/opt/akkoma/config/ \ - akkoma ./bin/pleroma_ctl instance gen --no-sql-user --no-db-creation --dbhost db --dbname akkoma --dbuser akkoma --dbpass akkoma --listen-ip 0.0.0.0 --listen-port 4000 --static-dir /opt/akkoma/instance/ --uploads-dir /opt/akkoma/uploads/ --db-configurable true + -v $(pwd)/docker-setup-tmp:/opt/akkoma/config/:z \ + akkoma ./bin/pleroma_ctl instance gen --no-sql-user --no-db-creation --dbhost db --dbname akkoma --dbuser akkoma --dbpass akkoma --listen-ip 0.0.0.0 --listen-port 4000 --static-dir /opt/akkoma/instance/ --uploads-dir /opt/akkoma/uploads/ --db-configurable true --output /opt/akkoma/config/generated_config.exs --output-psql /opt/akkoma/config/setup_db.psql echo "" echo "=========================="