Add(module): add girasol module
Add(module): add amap module Add(module): add common lib and services Add(module): add base structure for keycloak Add(module): add base structure for rocket Add(module): add n8n and windmill modules Add(docker): add install docker script in common module Add(template): add root for aldon.fr and mathieu.wiki in traefik.service template
This commit is contained in:
15
modules/apps/windmill/lib/scripts/create-backup.sh
Normal file
15
modules/apps/windmill/lib/scripts/create-backup.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
#SERVICE_BACKUPS_DIR
|
||||
#SERVICE_BACKUPS_PREFIX
|
||||
#SERVICE_BACKUPS_EXTENSION
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
source /opt/environment/.env
|
||||
|
||||
TIMESTAMP=$(date +'%Y-%m-%d_%H%M%S')
|
||||
|
||||
# docker exec $DB_SERVICE
|
||||
|
||||
ls -1dt $SERVICE_BACKUPS_DIR/$SERVICE_BACKUPS_PREFIX-*.$SERVICE_BACKUPS_EXTENSION | tail -n +5 | xargs -r rm -f
|
||||
11
modules/apps/windmill/lib/scripts/install-windmill.sh
Normal file
11
modules/apps/windmill/lib/scripts/install-windmill.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
#https://www.windmill.dev/docs/advanced/self_host
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
source /opt/environment/.env
|
||||
|
||||
cd $SERVICE_WORKDIR
|
||||
cp /opt/environment/.env $SERVICE_WORKDIR/.env
|
||||
docker-compose up -d
|
||||
20
modules/apps/windmill/lib/scripts/restore-backup.sh
Normal file
20
modules/apps/windmill/lib/scripts/restore-backup.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
#USERNAME
|
||||
#SERVICE_BACKUPS_DIR
|
||||
#SERVICE_BACKUPS_PREFIX
|
||||
#SERVICE_BACKUPS_EXTENSION
|
||||
#DB_USER
|
||||
#DB_NAME
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
source /opt/environment/.env
|
||||
|
||||
LATEST_BACKUP=$(ls -1 $SERVICE_BACKUPS_DIR/$SERVICE_BACKUPS_PREFIX-*.$SERVICE_BACKUPS_EXTENSION 2>/dev/null | sort | tail -n1)
|
||||
|
||||
if [ -n "$LATEST_BACKUP" ] && [ -f "$LATEST_BACKUP" ]; then
|
||||
systemctl stop listmonk
|
||||
sudo -u $USERNAME pg_restore --clean --if-exists -U "$DB_USER" -d "$DB_NAME" $LATEST_BACKUP
|
||||
systemctl start listmonk
|
||||
fi
|
||||
Reference in New Issue
Block a user