Compare commits
No commits in common. "03ccb492292bfe7034dba9b1b5aaf1bf98aab8aa" and "e0a624584298930ba16a139a1939067e4f9a865d" have entirely different histories.
03ccb49229
...
e0a6245842
10 changed files with 34 additions and 136 deletions
|
@ -28,7 +28,6 @@ all:
|
||||||
volumes:
|
volumes:
|
||||||
- forgejo_data
|
- forgejo_data
|
||||||
- homebox_data
|
- homebox_data
|
||||||
- immich_upload
|
|
||||||
- influxdb_data
|
- influxdb_data
|
||||||
- jellyfin_config
|
- jellyfin_config
|
||||||
#- jellyfin_media # TODO
|
#- jellyfin_media # TODO
|
||||||
|
|
|
@ -37,8 +37,6 @@
|
||||||
tags: [healthcheck, monitoring]
|
tags: [healthcheck, monitoring]
|
||||||
- role: homebox
|
- role: homebox
|
||||||
tags: [homebox, inventory]
|
tags: [homebox, inventory]
|
||||||
- role: immich
|
|
||||||
tags: [immich, gallery]
|
|
||||||
- role: influxdb
|
- role: influxdb
|
||||||
tags: [influxdb, sensors, monitoring]
|
tags: [influxdb, sensors, monitoring]
|
||||||
- role: jellyfin
|
- role: jellyfin
|
||||||
|
|
30
roles/backup/files/docker-compose.yml
Normal file
30
roles/backup/files/docker-compose.yml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
backup:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
image: backup
|
||||||
|
restart: never
|
||||||
|
env_file:
|
||||||
|
- service.env
|
||||||
|
volumes:
|
||||||
|
- /tmp/backup-misc:/backup/misc
|
||||||
|
- gitea_data:/backup/volumes/gitea_data
|
||||||
|
- influxdb_data:/backup/volumes/influxdb_data
|
||||||
|
- reitanlage_data:/backup/volumes/reitanlage_data
|
||||||
|
- synapse_media_store:/backup/volumes/synapse_media_store
|
||||||
|
- tandoor_mediafiles:/backup/volumes/tandoor_mediafiles
|
||||||
|
command: restic backup /backup
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
gitea_data:
|
||||||
|
external: true
|
||||||
|
influxdb_data:
|
||||||
|
external: true
|
||||||
|
reitanlage_data:
|
||||||
|
external: true
|
||||||
|
synapse_media_store:
|
||||||
|
external: true
|
||||||
|
tandoor_mediafiles:
|
||||||
|
external: true
|
|
@ -1,5 +0,0 @@
|
||||||
backup_path="$BACKUP_LOCATION/immich"
|
|
||||||
mkdir -p "$backup_path"
|
|
||||||
|
|
||||||
cd /opt/services/immich || exit
|
|
||||||
docker compose exec database pg_dump -U "$DB_USERNAME" "$DB_DATABASE" | gzip >"$backup_path/immich.sql.gz"
|
|
|
@ -6,9 +6,9 @@ postgres_tables=$(sudo -u postgres psql -Atc "SELECT datname FROM pg_database WH
|
||||||
for i in $postgres_tables
|
for i in $postgres_tables
|
||||||
do
|
do
|
||||||
printf "dumping %s ..." "$i"
|
printf "dumping %s ..." "$i"
|
||||||
sudo -u postgres pg_dump "$i" | gzip >"pg_dump_$i.sql.gz"
|
sudo -u postgres pg_dump "$i" | gzip >"pg_dump_$i.gz"
|
||||||
echo " done"
|
echo " done"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "dumping all"
|
echo "dumping all"
|
||||||
sudo -u postgres pg_dumpall | gzip >"pg_dumpall.sql.gz"
|
sudo -u postgres pg_dumpall | gzip >"pg_dumpall.gz"
|
||||||
|
|
|
@ -28,22 +28,4 @@ backup_compose:
|
||||||
- --retry-lock=1m
|
- --retry-lock=1m
|
||||||
restart: never
|
restart: never
|
||||||
hostname: "{{ ansible_facts.hostname }}"
|
hostname: "{{ ansible_facts.hostname }}"
|
||||||
mount:
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
image: backup
|
|
||||||
restart: never
|
|
||||||
hostname: "{{ ansible_facts.hostname }}"
|
|
||||||
env_file:
|
|
||||||
- service.env
|
|
||||||
entrypoint:
|
|
||||||
- /usr/bin/restic
|
|
||||||
- --retry-lock=1m
|
|
||||||
command:
|
|
||||||
- mount
|
|
||||||
- /mnt
|
|
||||||
privileged: true
|
|
||||||
devices:
|
|
||||||
- /dev/fuse
|
|
||||||
|
|
||||||
volumes: "{{ host_backup.volumes | map_backup_volumes }}"
|
volumes: "{{ host_backup.volumes | map_backup_volumes }}"
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
extra_services_default:
|
extra_services_default:
|
||||||
- domain: cloud-old.serguzim.me
|
- domain: cloud-old.serguzim.me
|
||||||
docker_host: nextcloud
|
docker_host: host.docker.internal
|
||||||
port: 80
|
port: 3015
|
||||||
caddy_extra: |
|
caddy_extra: |
|
||||||
redir /.well-known/host-meta /public.php?service=host-meta 301
|
redir /.well-known/host-meta /public.php?service=host-meta 301
|
||||||
redir /.well-known/host-meta.json /public.php?service=host-meta-json 301
|
redir /.well-known/host-meta.json /public.php?service=host-meta-json 301
|
||||||
|
|
|
@ -46,8 +46,6 @@ gethomepage_services_yml:
|
||||||
key: "{{ vault_gethomepage.authentik.key }}"
|
key: "{{ vault_gethomepage.authentik.key }}"
|
||||||
- coder.serguzim.me:
|
- coder.serguzim.me:
|
||||||
href: https://coder.serguzim.me
|
href: https://coder.serguzim.me
|
||||||
- gallery.serguzim.me:
|
|
||||||
href: https://gallery.serguzim.me
|
|
||||||
- git.serguzim.me:
|
- git.serguzim.me:
|
||||||
href: https://git.serguzim.me
|
href: https://git.serguzim.me
|
||||||
- inventory.serguzim.me:
|
- inventory.serguzim.me:
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
---
|
|
||||||
- name: Set common facts
|
|
||||||
ansible.builtin.import_tasks: tasks/set-default-facts.yml
|
|
||||||
|
|
||||||
- name: Deploy {{ svc.name }}
|
|
||||||
vars:
|
|
||||||
svc: "{{ immich_svc }}"
|
|
||||||
env: "{{ immich_env }}"
|
|
||||||
compose: "{{ immich_compose }}"
|
|
||||||
block:
|
|
||||||
- name: Import tasks to deploy common service
|
|
||||||
ansible.builtin.import_tasks: tasks/deploy-common-service.yml
|
|
|
@ -1,92 +0,0 @@
|
||||||
---
|
|
||||||
immich_db_host: database
|
|
||||||
immich_db_db: immich
|
|
||||||
immich_db_user: "{{ vault_immich.db.user }}"
|
|
||||||
immich_db_pass: "{{ vault_immich.db.pass }}"
|
|
||||||
|
|
||||||
immich_svc:
|
|
||||||
domain: gallery.serguzim.me
|
|
||||||
name: immich
|
|
||||||
port: 3001
|
|
||||||
version: release
|
|
||||||
db:
|
|
||||||
host: "{{ postgres.host }}"
|
|
||||||
database: authentik
|
|
||||||
|
|
||||||
|
|
||||||
immich_env:
|
|
||||||
# IMMICH_CONFIG_FILE: /immich.json
|
|
||||||
|
|
||||||
TZ: "{{ timezone }}"
|
|
||||||
|
|
||||||
DB_HOSTNAME: "{{ immich_db_host }}"
|
|
||||||
DB_DATABASE_NAME: "{{ immich_db_db }}"
|
|
||||||
DB_USERNAME: "{{ immich_db_user }}"
|
|
||||||
DB_PASSWORD: "{{ immich_db_pass }}"
|
|
||||||
|
|
||||||
POSTGRES_DB: "{{ immich_db_db }}"
|
|
||||||
POSTGRES_USER: "{{ immich_db_user }}"
|
|
||||||
POSTGRES_PASSWORD: "{{ immich_db_pass }}"
|
|
||||||
|
|
||||||
REDIS_HOSTNAME: redis
|
|
||||||
|
|
||||||
immich_compose:
|
|
||||||
watchtower: false
|
|
||||||
image: ghcr.io/immich-app/immich-server:release
|
|
||||||
volumes:
|
|
||||||
- upload:/usr/src/app/upload
|
|
||||||
file:
|
|
||||||
services:
|
|
||||||
app:
|
|
||||||
command: ["start.sh", "immich"]
|
|
||||||
depends_on:
|
|
||||||
- database
|
|
||||||
- redis
|
|
||||||
|
|
||||||
microservices:
|
|
||||||
image: ghcr.io/immich-app/immich-server:release
|
|
||||||
# extends:
|
|
||||||
# file: hwaccel.yml
|
|
||||||
# service: hwaccel
|
|
||||||
command: ["start.sh", "microservices"]
|
|
||||||
volumes:
|
|
||||||
- upload:/usr/src/app/upload
|
|
||||||
env_file:
|
|
||||||
- service.env
|
|
||||||
depends_on:
|
|
||||||
- redis
|
|
||||||
- database
|
|
||||||
restart: always
|
|
||||||
networks:
|
|
||||||
default:
|
|
||||||
|
|
||||||
machine-learning:
|
|
||||||
image: ghcr.io/immich-app/immich-machine-learning:release
|
|
||||||
volumes:
|
|
||||||
- model-cache:/cache
|
|
||||||
env_file:
|
|
||||||
- service.env
|
|
||||||
restart: always
|
|
||||||
networks:
|
|
||||||
default:
|
|
||||||
|
|
||||||
redis:
|
|
||||||
image: redis:6.2-alpine
|
|
||||||
restart: always
|
|
||||||
networks:
|
|
||||||
default:
|
|
||||||
|
|
||||||
database:
|
|
||||||
image: tensorchord/pgvecto-rs:pg16-v0.1.11
|
|
||||||
env_file:
|
|
||||||
- service.env
|
|
||||||
volumes:
|
|
||||||
- pgdata:/var/lib/postgresql/data
|
|
||||||
restart: always
|
|
||||||
networks:
|
|
||||||
default:
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
upload:
|
|
||||||
pgdata:
|
|
||||||
model-cache:
|
|
Reference in a new issue