diff --git a/bxl-shp/apps/docker-compose.joplin.yaml b/bxl-shp/apps/docker-compose.joplin.yaml new file mode 100644 index 0000000..41c09b9 --- /dev/null +++ b/bxl-shp/apps/docker-compose.joplin.yaml @@ -0,0 +1,35 @@ +services: + joplin-server: + container_name: joplin + image: joplin/server:latest + restart: unless-stopped + volumes: + - /etc/localtime:/etc/localtime:ro + - /etc/timezone:/etc/timezone:ro + environment: + - APP_PORT=22300 + - APP_BASE_URL=https://joplin.bhasher.com + - DB_CLIENT=pg + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - POSTGRES_DATABASE=joplin + - POSTGRES_HOST=postgres + - TZ=Europe/Paris + ports: + - 22300:22300/tcp + labels: + - "traefik.enable=true" + - "traefik.http.routers.joplin.rule=Host(`joplin.bhasher.com`)" + - "traefik.http.services.joplin.loadbalancer.server.port=22300" + - "traefik.http.routers.joplin.tls=true" + - "traefik.http.routers.joplin.tls.certresolver=http" + - "traefik.http.routers.joplin.entrypoints=internalsecure" + networks: + - storage + - external + +networks: + storage: + external: true + external: + external: true diff --git a/bxl-shp/config/borg/borg.service b/bxl-shp/config/borg/borg.service deleted file mode 100644 index 0d9d71b..0000000 --- a/bxl-shp/config/borg/borg.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Start Borg Backup Container -After=docker.service -ConditionPathExists=/mnt/borg - -[Service] -Type=oneshot -ExecStart=/usr/bin/docker start borg -User=pi -Group=pi -Restart=no - -[Install] -WantedBy=multi-user.target diff --git a/bxl-shp/config/borg/borg.timer b/bxl-shp/config/borg/borg.timer deleted file mode 100644 index 17763b3..0000000 --- a/bxl-shp/config/borg/borg.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Run Borg Backup at 4 a.m. every day - -[Timer] -OnCalendar=*-*-* 04:00:00 -Persistent=true - -[Install] -WantedBy=timers.target diff --git a/bxl-shp/system/docker-compose.backup.yaml b/bxl-shp/system/docker-compose.backup.yaml index 5a048ce..0f49ab9 100644 --- a/bxl-shp/system/docker-compose.backup.yaml +++ b/bxl-shp/system/docker-compose.backup.yaml @@ -5,7 +5,7 @@ services: restart: unless-stopped volumes: - $DATA:/mnt/source:ro - - $BACKUP:/mnt/borg-repository:rw + - $BACKUP/shp:/mnt/borg-repository:rw - $CONFIG/borgmatic/etc:/etc/borgmatic.d - $DATA/borgmatic/borg:/root/.config/borg - $DATA/borgmatic/ssh:/root/.ssh @@ -19,3 +19,21 @@ services: networks: - storage + borgmatic-vps: + container_name: borgmatic-vps + image: ghcr.io/borgmatic-collective/borgmatic:latest + restart: unless-stopped + volumes: + - /mnt/vps:/mnt/source:ro + - $BACKUP/vps:/mnt/borg-repository:rw + - $CONFIG/borgmatic/etc:/etc/borgmatic.d + - $DATA/borgmatic-vps/borg:/root/.config/borg + - $DATA/borgmatic-vps/ssh:/root/.ssh + - $DATA/borgmatic-vps/cache:/root/.cache/borg + - /etc/localtime:/etc/localtime:ro + environment: + - TZ=Europe/Paris + - BORG_PASSPHRASE=none + - BACKUP_CRON=0 5 * * * + - RUN_ON_STARTUP=true +