Merge pull request 'testing the workflow' (#2) from create-recipe-first-version into main

Reviewed-on: #2
This commit is contained in:
blu
2024-03-15 15:54:35 +00:00
3 changed files with 30 additions and 6 deletions

View File

@ -15,15 +15,31 @@
## Usage ## Usage
### Basic initial setup ### Server setup
1. Set up your server ([tutorial](https://docs.coopcloud.tech/operators/tutorial/#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. 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`). 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 ### 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 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 config open-inventory.example.net`
- be sure to change `DOMAIN` to something that resolves to - be sure to change `DOMAIN` to something that resolves to
your server your server
- `APP_URL` as well needs to be set - `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```
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
```

View File

@ -4,6 +4,7 @@ services:
app: app:
# Dockerfile here: # Dockerfile here:
image: codeberg.org/eotl/open-inventory:0.0.8 image: codeberg.org/eotl/open-inventory:0.0.8
entrypoint: ./entrypoint.sh
depends_on: depends_on:
- db - db
networks: networks:
@ -40,8 +41,11 @@ services:
environment: environment:
- MYSQL_DATABASE=open-inventory - MYSQL_DATABASE=open-inventory
- MYSQL_USER=open-inventory - MYSQL_USER=open-inventory
- MYSQL_PASSWORD=open-inventory-db-password - MYSQL_PASSWORD_FILE=/run/secrets/db_password
- MYSQL_ROOT_PASSWORD="open-inventory-db-root-password" - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
secrets:
- db_password
- db_root_password
deploy: deploy:
labels: [ 'coop-cloud.${STACK_NAME}.db.version=10.5-31e52f4d87a' ] labels: [ 'coop-cloud.${STACK_NAME}.db.version=10.5-31e52f4d87a' ]
networks: networks:

View File

@ -6,3 +6,7 @@ export DB_PASSWORD=$(cat /run/secrets/db_password)
# DB container # DB container
export MYSQL_PASSWORD=$(cat /run/secrets/db_password) export MYSQL_PASSWORD=$(cat /run/secrets/db_password)
export MYSQL_ROOT_PASSWORD=$(cat /run/secrets/db_root_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