cleanup deployment
This commit is contained in:
parent
41be255144
commit
c863e5fe21
3 changed files with 8 additions and 17 deletions
4
Makefile
4
Makefile
|
@ -8,9 +8,9 @@ psql:
|
||||||
|
|
||||||
update:
|
update:
|
||||||
read -p "Update will cause downtime of the server. Are you sure you want to continue? Press Ctrl+c to abort!" _
|
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) pull
|
||||||
$(COMPOSE) run inventree-server invoke update
|
$(COMPOSE) down
|
||||||
|
$(COMPOSE) run --rm inventree-server invoke update
|
||||||
$(COMPOSE) up -d
|
$(COMPOSE) up -d
|
||||||
|
|
||||||
data: # podman does not autocreate data folder
|
data: # podman does not autocreate data folder
|
||||||
|
|
6
backup.sh
Normal file
6
backup.sh
Normal 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
|
15
compose.yml
15
compose.yml
|
@ -79,21 +79,6 @@ services:
|
||||||
- 8000
|
- 8000
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .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:
|
depends_on:
|
||||||
- inventree-db
|
- inventree-db
|
||||||
volumes:
|
volumes:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue