From 8e51569ee490851ea0b0e075d046611d4d33ab8c Mon Sep 17 00:00:00 2001 From: Mac Chaffee Date: Tue, 9 Sep 2025 19:22:17 -0400 Subject: [PATCH] fix: move data to /data --- .env.sample | 1 + README.md | 3 ++- compose.yml | 6 +++--- entrypoint.sh | 12 +++++++++--- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.env.sample b/.env.sample index 762994b..2d5556b 100644 --- a/.env.sample +++ b/.env.sample @@ -9,6 +9,7 @@ FEDERATION=true LOCAL_TIMELINE=false OPEN_DELETION=false OPEN_REGISTRATION=true +# This settings requires authentication to read posts PRIVATE=true PUBLIC_STATS=true SITE_DESCRIPTION= diff --git a/README.md b/README.md index c9a8c2e..c712236 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,8 @@ 2. Deploy `coop-cloud/traefik` 3. `abra app new writefreely` 4. `abra app config ` - be sure to change `` to something that resolves to - your Docker swarm box + your coop-cloud server. + - For more info about the config options, see the [writefreely docs](https://writefreely.org/docs/main/admin/config). 5. `abra app deploy ` 6. Once it's running, if you are not using SSO, set up a local admin user by running this command: diff --git a/compose.yml b/compose.yml index 89c81eb..79986f0 100644 --- a/compose.yml +++ b/compose.yml @@ -18,13 +18,13 @@ services: - SITE_THEME configs: - source: config_ini - target: /go/config.ini + target: /data/config.ini - source: writefreely_entrypoint target: /abra-entrypoint.sh mode: 0555 entrypoint: /abra-entrypoint.sh volumes: - - "web-keys:/go/keys" + - "local-data:/data" networks: - internal - proxy @@ -44,7 +44,7 @@ services: - "coop-cloud.${STACK_NAME}.version=0.1.0+latest" volumes: - web-keys: + local-data: networks: proxy: diff --git a/entrypoint.sh b/entrypoint.sh index 8d99c34..aa1fa07 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,5 +1,11 @@ #!/bin/sh -/go/cmd/writefreely/writefreely --gen-keys > /dev/null -/go/cmd/writefreely/writefreely db init > /dev/null -/go/cmd/writefreely/writefreely db migrate > /dev/null +set -e + +if [ ! -f /data/abra_first_time_setup ]; then + echo "Running first-time setup" + /go/cmd/writefreely/writefreely --gen-keys + /go/cmd/writefreely/writefreely db init + touch /data/abra_first_time_setup +fi +/go/cmd/writefreely/writefreely db migrate exec /go/cmd/writefreely/writefreely