From 3ec60cc51860204f04ac42d76a6ec0d8bb43eb4b Mon Sep 17 00:00:00 2001 From: Mayel de Borniol Date: Wed, 30 Mar 2022 16:38:17 +1300 Subject: [PATCH] improve --- .env.sample | 15 +++++++++------ README.md | 17 +++++++++++------ compose.yml | 2 +- secrets.sh | 2 +- 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/.env.sample b/.env.sample index 632dde1..fafde67 100644 --- a/.env.sample +++ b/.env.sample @@ -7,9 +7,9 @@ FLAVOUR=classic APP_DOCKER_IMAGE=bonfirenetworks/bonfire:latest-${FLAVOUR} # different flavours or architectures may require different postgres builds: -# DB_DOCKER_IMAGE=postgres:12-alpine -# DB_DOCKER_IMAGE=postgis/postgis:12-3.1-alpine -DB_DOCKER_IMAGE=odidev/postgis:12-3.1-alpine +DB_DOCKER_IMAGE=postgres:12-alpine +#DB_DOCKER_IMAGE=postgis/postgis:12-3.2-alpine +#DB_DOCKER_IMAGE=ghcr.io/baosystems/postgis:12-3.2 # enter your instance's domain name DOMAIN=bonfire.example.com @@ -32,6 +32,9 @@ INSTANCE_DESCRIPTION="An instance of Bonfire, a federated app ecosystem for open # max file upload size - default is 20 meg UPLOAD_LIMIT=20000000 +# how much info to include in logs (from less to more: emergency, alert, critical, error, warning, notice, info, debug) +LOG_LEVEL=info + # ==================================== # SECRETS @@ -64,9 +67,9 @@ SECRET_MEILI_MASTER_KEY_VERSION=v1 SECRET_SEEDS_PW_VERSION=v1 SECRET_LIVEBOOK_PASSWORD_VERSION=v1 -SECRET_SECRET_KEY_BASE_VERSION=v2 -SECRET_SIGNING_SALT_VERSION=v2 -SECRET_ENCRYPTION_SALT_VERSION=v2 +SECRET_SECRET_KEY_BASE_VERSION=v1 # length=128 +SECRET_SIGNING_SALT_VERSION=v1 # length=128 +SECRET_ENCRYPTION_SALT_VERSION=v1 # length=128 # ==================================== # You should not have to edit any of the following ones: diff --git a/README.md b/README.md index dc34bc3..ce4a3cc 100644 --- a/README.md +++ b/README.md @@ -15,16 +15,21 @@ A [coop-cloud](https://coopcloud.tech) recipe for deploying [Bonfire](https://bo ## Basic usage -1. Set up Docker Swarm and [`abra`] -2. Deploy the [`coop-cloud/traefik`] proxy if you haven't already -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 +1. Install [`abra`] on your computer +2. Set up your server with `abra server add --provision your-server.domain.name server_username 22` +3. Deploy the [`coop-cloud/traefik`] proxy if you haven't already +3. `abra app new --secrets https://github.com/bonfire-networks/bonfire-deploy` +4. Generate extra secrets with `~/.abra/apps/bonfire/secrets.sh YOUR_APP_NAME` and edit the config (in next step) for `SECRET_SECRET_KEY_BASE_VERSION`, `SECRET_SIGNING_SALT_VERSION`, and `SECRET_ENCRYPTION_SALT_VERSION` from `v1` to `v2` +5. `abra app config YOUR_APP_NAME` to check and edit the config (there are comments to explain the different options) 6. `abra app deploy YOUR_APP_NAME` 7. Open the configured domain in your browser and sign up! ## Upgrades `abra app deploy --force YOUR_APP_NAME` -[`abra`]: https://git.coopcloud.tech/coop-cloud/abra +[`abra`]: https://docs.coopcloud.tech/abra/ [`coop-cloud/traefik`]: https://git.coopcloud.tech/coop-cloud/traefik + +## FAQ +### The app isn't starting +On the server, try this command to see what services are starting or not: `docker service ls` and this one to debug why one isn't starting: `docker service ps $container_name` \ No newline at end of file diff --git a/compose.yml b/compose.yml index 2f78c79..ae2164c 100644 --- a/compose.yml +++ b/compose.yml @@ -3,7 +3,7 @@ version: "3.8" services: app: - image: bonfirenetworks/bonfire:latest-${FLAVOUR} + image: ${APP_DOCKER_IMAGE} depends_on: - db - search diff --git a/secrets.sh b/secrets.sh index 590209a..ab32901 100755 --- a/secrets.sh +++ b/secrets.sh @@ -1,6 +1,6 @@ #/bin/sh -abra app secret generate --all $1 +# abra app secret generate --all $1 s1=$(openssl rand -base64 128) s2=$(openssl rand -base64 128)