This commit is contained in:
Brieuc Dubois 2023-10-12 19:37:11 +02:00 committed by shp
parent 7b3a2d189b
commit c557edb6dc
4 changed files with 54 additions and 24 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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