fix: create volume for db

This commit is contained in:
Mac Chaffee
2025-09-09 19:22:17 -04:00
parent adf19b96e1
commit 1e39d1d6c1
5 changed files with 15 additions and 5 deletions

View File

@ -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=

View File

@ -21,7 +21,8 @@
2. Deploy `coop-cloud/traefik`
3. `abra app new writefreely`
4. `abra app config <domain>` - be sure to change `<domain>` 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 <domain>`
6. Once it's running, if you are not using SSO, set up a local admin user by running this command:

View File

@ -25,6 +25,7 @@ services:
entrypoint: /abra-entrypoint.sh
volumes:
- "web-keys:/go/keys"
- "local-data:/go/data"
networks:
- internal
- proxy
@ -45,6 +46,7 @@ services:
volumes:
web-keys:
local-data:
networks:
proxy:

View File

@ -14,7 +14,7 @@ gopher_port = 0
[database]
type = {{ if eq (env "USE_MARIADB") "true" }}mysql{{ else }}sqlite3{{ end }}
filename = {{ if eq (env "USE_MARIADB") "true" }}{{ else }}writefreely.db{{ end }}
filename = {{ if eq (env "USE_MARIADB") "true" }}{{ else }}data/writefreely.db{{ end }}
username = {{ if eq (env "USE_MARIADB") "true" }}writeas{{ else }}{{ end }}
password = {{ if eq (env "USE_MARIADB") "true" }}{{ secret "db_password" }}{{ else }}{{ end }}
database = {{ if eq (env "USE_MARIADB") "true" }}writefreely{{ else }}{{ end }}

View File

@ -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 ./keys/abra_first_time_setup ]; then
echo "Running first-time setup"
/go/cmd/writefreely/writefreely --gen-keys
/go/cmd/writefreely/writefreely db init
touch ./keys/abra_first_time_setup
fi
/go/cmd/writefreely/writefreely db migrate
exec /go/cmd/writefreely/writefreely