cleanup deployment

This commit is contained in:
Philipp 2025-09-17 15:26:20 +02:00
parent 41be255144
commit c863e5fe21
Signed by: philipp
SSH key fingerprint: SHA256:ZWe7taUXeJb8xtjCZE7rZ3baSkVpBPjE4hdoKyJpfQE
3 changed files with 8 additions and 17 deletions

View file

@ -8,9 +8,9 @@ psql:
update:
read -p "Update will cause downtime of the server. Are you sure you want to continue? Press Ctrl+c to abort!" _
$(COMPOSE) down
$(COMPOSE) pull
$(COMPOSE) run inventree-server invoke update
$(COMPOSE) down
$(COMPOSE) run --rm inventree-server invoke update
$(COMPOSE) up -d
data: # podman does not autocreate data folder

6
backup.sh Normal file
View file

@ -0,0 +1,6 @@
#!/bin/sh
time=$(date +"%Y-%m-%dT%H:%M:%S%z")
dir=backup
[ -d "${dir}" ] || mkdir -p "${dir}"
docker compose run --rm -u postgres inventree-db sh -c 'PGPASSWORD=$POSTGRES_PASSWORD pg_dump -h inventree-db -p 5432 -U $POSTGRES_USER inventree' > "${dir}/${time}.sql"
# to restore: pg_restore -d newdb db.dump

View file

@ -79,21 +79,6 @@ services:
- 8000
env_file:
- .env
environment:
INVENTREE_SOCIAL_PROVIDERS: |
{
"openid_connect": {
"SERVERS": [{
"id": "oidc",
"name": "Hacknang SSO",
"server_url": "${HKNG_OIDC_URL:?You must provide the 'HKNG_OIDC_URL' variable in the .env file}",
"APP": {
"client_id": "${HKNG_OIDC_CLIENT_ID:?You must provide the 'HKNG_OIDC_CLIENT_ID' variable in the .env file}",
"secret": "${HKNG_OIDC_CLIENT_SECRET:?You must provide the 'HKNG_OIDC_CLIENT_SECRET' variable in the .env file}"
}
}]
}
}
depends_on:
- inventree-db
volumes: