From 8de6b187a0089e234f043de0a340436293731c54 Mon Sep 17 00:00:00 2001 From: blu Date: Fri, 15 Mar 2024 16:44:00 +0100 Subject: [PATCH 1/2] testing the workflow --- README.md | 9 ++++++++- compose.yml | 8 ++++++-- entrypoint.sh | 4 ++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aef1e54..8fc3f56 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ ## Usage -### Basic initial setup +### Server setup 1. Set up your server ([tutorial](https://docs.coopcloud.tech/operators/tutorial/#server-setup)) 1. Install `abra` locally ([guide here](https://docs.coopcloud.tech/operators/tutorial/#install-abra)) 1. Deploy [`coop-cloud/traefik`](https://git.autonomic.zone/coop-cloud/traefik) on the server. It acts as proxy, and it handles automagically TLS certificate creation and update (via `Let's Encrypt`). @@ -27,3 +27,10 @@ your server - `APP_URL` as well needs to be set 1. `abra app deploy open-inventory.example.net` + +### open-inventory initial setup + +1. Run + + ```abra app cmd open-inventory.example.net app initial_setup``` + it will run the initial migrations, and create the first admin user diff --git a/compose.yml b/compose.yml index 3c0902e..7d19c32 100644 --- a/compose.yml +++ b/compose.yml @@ -4,6 +4,7 @@ services: app: # Dockerfile here: image: codeberg.org/eotl/open-inventory:0.0.8 + entrypoint: ./entrypoint.sh depends_on: - db networks: @@ -40,8 +41,11 @@ services: environment: - MYSQL_DATABASE=open-inventory - MYSQL_USER=open-inventory - - MYSQL_PASSWORD=open-inventory-db-password - - MYSQL_ROOT_PASSWORD="open-inventory-db-root-password" + - MYSQL_PASSWORD_FILE=/run/secrets/db_password + - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password + secrets: + - db_password + - db_root_password deploy: labels: [ 'coop-cloud.${STACK_NAME}.db.version=10.5-31e52f4d87a' ] networks: diff --git a/entrypoint.sh b/entrypoint.sh index ca0944f..0af6381 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,3 +6,7 @@ export DB_PASSWORD=$(cat /run/secrets/db_password) # DB container export MYSQL_PASSWORD=$(cat /run/secrets/db_password) export MYSQL_ROOT_PASSWORD=$(cat /run/secrets/db_root_password) + +# Upstream ENTRYPOINT +# https://codeberg.org/eotl/open-inventory/src/branch/main/docker/prod/Dockerfile +/app/docker/entrypoint.sh From 829321a3d6574f6c477f2a4f516fa555298df770 Mon Sep 17 00:00:00 2001 From: blu Date: Fri, 15 Mar 2024 16:49:41 +0100 Subject: [PATCH 2/2] update README.md --- README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8fc3f56..d1869c0 100644 --- a/README.md +++ b/README.md @@ -21,16 +21,25 @@ 1. Deploy [`coop-cloud/traefik`](https://git.autonomic.zone/coop-cloud/traefik) on the server. It acts as proxy, and it handles automagically TLS certificate creation and update (via `Let's Encrypt`). ### Create `open-inventory` app and deploy -1. `abra app new open-inventory --secrets` (optionally with `--pass` if you'd like to save secrets in pass) -1. `abra app config open-inventory.example.net` +1. `$ abra app new open-inventory --secrets` (optionally with `--pass` if you'd like to save secrets in pass) +1. `$ abra app config open-inventory.example.net` - be sure to change `DOMAIN` to something that resolves to your server - `APP_URL` as well needs to be set -1. `abra app deploy open-inventory.example.net` +1. `$ abra app deploy open-inventory.example.net` ### open-inventory initial setup 1. Run - ```abra app cmd open-inventory.example.net app initial_setup``` + ```$ abra app cmd open-inventory.example.net app initial_setup``` it will run the initial migrations, and create the first admin user + + +## open-inventory specific abra commands +Have a look at the abra.sh file in this repo, +there are some handy commands ready. +You can run them as, for example: +```bash +$ abra app cmd open-inventory.example.net app clear_cache +```