Skip to content

Commit

Permalink
Merge branch 'master' into onramp-rework-env
Browse files Browse the repository at this point in the history
  • Loading branch information
salverius-tech committed Apr 13, 2024
2 parents 65e7343 + f89e15c commit a8b5b98
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
11 changes: 5 additions & 6 deletions make.d/backup.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
##
#########################################################

$(NFS_BACKUP_TMP_DIR):
sudo mkdir -p $(NFS_BACKUP_TMP_DIR)
sudo mount -t nfs $(NFS_SERVER):$(NFS_BACKUP_PATH) $(NFS_BACKUP_TMP_DIR)

create-backup: backups ## create a backup of the onramp config
sudo tar --exclude=.keep --exclude=etc/plex/Library -czf ./backups/onramp-config-backup-$(HOST_NAME)-$(shell date +'%y-%m-%d-%H%M').tar.gz ./etc ./services-enabled ./overrides-enabled ./environments-enabled ./media/databases || true

create-nfs-backup: create-backup ## create a backup of the onramp config and copy it to the nfs server
sudo mount -t nfs $(NFS_SERVER):$(NFS_BACKUP_PATH) $(NFS_BACKUP_TMP_DIR)
create-nfs-backup: $(NFS_BACKUP_TMP_DIR) create-backup ## create a backup of the onramp config and copy it to the nfs server
sudo mv ./backups/onramp-config-backup* $(NFS_BACKUP_TMP_DIR)
sudo umount $(NFS_BACKUP_TMP_DIR)

Expand All @@ -18,10 +21,6 @@ backups: ## create backups folder
restore-backup: ## restore the latest backup of the onramp config
sudo tar -xvf ./backups/onramp-config-backup-$(HOST_NAME)-*.tar.gz

$(NFS_BACKUP_TMP_DIR):
sudo mkdir -p $(NFS_BACKUP_TMP_DIR)
sudo mount -t nfs $(NFS_SERVER):$(NFS_BACKUP_PATH) $(NFS_BACKUP_TMP_DIR)

restore-nfs-backup: $(NFS_BACKUP_TMP_DIR) backups ## restore the latest backup of the onramp config from the nfs server
$(eval BACKUP_FILE := $(shell find $(NFS_BACKUP_TMP_DIR)/*$(HOST_NAME)* -type f -printf "%T@ %p\n" | sort -n | cut -d' ' -f 2- | tail -n 1))
sudo rm -rf ./backups/*
Expand Down
7 changes: 3 additions & 4 deletions services-available/vaultwarden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ services:
- PUID=${PUID:-1000}
- PGID=${PGID:-1000}
- TZ=${TZ}
- DOMAIN=${VAULTWARDEN_CONTAINER_NAME:-vaultwarden}.${HOST_DOMAIN}
# docker run --rm -it vaultwarden/server /vaultwarden hash --preset owasp
- ADMIN_TOKEN=${VAULTWARDEN_ADMIN_TOKEN}
- SIGNUPS_ALLOWED=${VAULTWARDEN_SIGNUPS_ALLOWED:-true}
- DOMAIN=https://${VAULTWARDEN_CONTAINER_NAME:-vaultwarden}.${HOST_DOMAIN}
- DOMAIN=https://${VAULTWARDEN_HOSTNAME:-vaultwarden}.${HOST_DOMAIN}
- SMTP_HOST=${VAULTWARDEN_SMTP_HOST:-smtp.domain.tld}
- SMTP_FROM=${VAULTWARDEN_SMTP_FROM:[email protected]}
- SMTP_FROM_NAME=${VAULTWARDEN_SMTP_FROM_NAME:-Vaultwarden}
Expand All @@ -36,10 +35,10 @@ services:
- SMTP_TIMEOUT=15

labels:
- joyride.host.name=${VAULTWARDEN_CONTAINER_NAME:-vaultwarden}.${HOST_DOMAIN}
- joyride.host.name=${VAULTWARDEN_HOSTNAME:-vaultwarden}.${HOST_DOMAIN}
- traefik.enable=true
- traefik.http.routers.vaultwarden.entrypoints=websecure
- traefik.http.routers.vaultwarden.rule=Host(`${VAULTWARDEN_CONTAINER_NAME:-vaultwarden}.${HOST_DOMAIN}`)
- traefik.http.routers.vaultwarden.rule=Host(`${VAULTWARDEN_HOSTNAME:-vaultwarden}.${HOST_DOMAIN}`)
- traefik.http.services.vaultwarden.loadbalancer.server.port=80
- com.centurylinklabs.watchtower.enable=true
- autoheal=true

0 comments on commit a8b5b98

Please sign in to comment.