diff --git a/.env.sample b/.env.sample index 03a9d74..632dde1 100644 --- a/.env.sample +++ b/.env.sample @@ -64,9 +64,9 @@ SECRET_MEILI_MASTER_KEY_VERSION=v1 SECRET_SEEDS_PW_VERSION=v1 SECRET_LIVEBOOK_PASSWORD_VERSION=v1 -SECRET_SECRET_KEY_BASE_VERSION=v1 # length=96 -SECRET_SIGNING_SALT_VERSION=v1 # length=96 -SECRET_ENCRYPTION_SALT_VERSION=v1 # length=96 +SECRET_SECRET_KEY_BASE_VERSION=v2 +SECRET_SIGNING_SALT_VERSION=v2 +SECRET_ENCRYPTION_SALT_VERSION=v2 # ==================================== # You should not have to edit any of the following ones: diff --git a/README.md b/README.md index ad59cc4..8a3a65b 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,11 @@ A [coop-cloud](https://coopcloud.tech) recipe for deploying [Bonfire](https://bo 1. Set up Docker Swarm and [`abra`] 2. Deploy the [`coop-cloud/traefik`] proxy if you haven't already -3. `abra app new https://github.com/bonfire-networks/bonfire-deploy --secrets` -4. `abra app config YOUR_APP_NAME` to edit your config. Be sure to change `$DOMAIN` to something that resolves to your Docker swarm box, check/edit the other config keys -5. `abra app deploy YOUR_APP_NAME` -6. Open the configured domain in your browser and sign up! +3. `abra app new ${REPO_NAME}` +4. Generate secrets with `./secrets.sh YOUR_APP_NAME` +5. `abra app config YOUR_APP_NAME` to edit your config. Be sure to change `$DOMAIN` to something that resolves to your Docker swarm box, check/edit the other config keys +6. `abra app deploy YOUR_APP_NAME` +7. Open the configured domain in your browser and sign up! [`abra`]: https://git.coopcloud.tech/coop-cloud/abra diff --git a/secrets.sh b/secrets.sh new file mode 100755 index 0000000..590209a --- /dev/null +++ b/secrets.sh @@ -0,0 +1,11 @@ +#/bin/sh + +abra app secret generate --all $1 + +s1=$(openssl rand -base64 128) +s2=$(openssl rand -base64 128) +s3=$(openssl rand -base64 128) + +abra app secret insert $1 secret_key_base v2 "$s1" +abra app secret insert $1 signing_salt v2 "$s2" +abra app secret insert $1 encryption_salt v2 "$s3"