Compare commits

...

3 Commits

Author SHA1 Message Date
ced832d359
Change settings
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2024-05-18 18:34:49 +02:00
0f7df1997f
Remove openSSH
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2024-05-18 18:27:22 +02:00
a141daff08
Add restic backup
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
2024-05-18 18:07:56 +02:00
8 changed files with 26 additions and 59 deletions

View File

@ -13,7 +13,7 @@
DOCKER := docker
PROFILES := caddy wordpress adminer uptime-kuma qbittorrent jellyfin watchtower backup syncthing openssh gitea gitea-runner
PROFILES := caddy wordpress adminer backup qbittorrent syncthing gitea gitea-runner uptime-kuma jellyfin watchtower
PROFILE_CMD := $(addprefix --profile ,$(PROFILES))
COMPOSE_FILES := $(shell find docker-compose*.yml | sed -e 's/^/--file /')

View File

@ -71,7 +71,6 @@ And then, caddy will generate the certificate for you and renew it automatically
| [link.bensuperpc.org](https://link.bensuperpc.org) | Sub | For link shortener |
| [jellyfin.bensuperpc.org](https://jellyfin.bensuperpc.org) | Sub | Jellyfin for media server |
| [syncthing.bensuperpc.org](https://syncthing.bensuperpc.org) | Sub | SyncThing for file synchronization |
| [ssh.bensuperpc.org](https://ssh.bensuperpc.org) | Sub | Openssh for ssh |
| bensuperpc.com | Main | Redirect to bensuperpc.org |
| bensuperpc.fr | Main | Redirect to bensuperpc.org |
| bensuperpc.net | Main | Redirect to bensuperpc.org |
@ -166,7 +165,6 @@ You can find all services on the [docker-compose.yml](docker-compose.yml) file o
| Gitea | Gitea for git | [git.bensuperpc.org](https://git.bensuperpc.org) |
| Jellyfin | Jellyfin for media server | [jellyfin.bensuperpc.org](https://jellyfin.bensuperpc.org) |
| SyncThing | SyncThing for file synchronization | [syncthing.bensuperpc.org](https://syncthing.bensuperpc.org) |
| Openssh | Openssh for ssh | [ssh.bensuperpc.org](https://ssh.bensuperpc.org) |
You can disable some services by removing the service name in PROFILES variable in the [Makefile](Makefile) file.

View File

@ -1,7 +1,7 @@
services:
# Backup
backup:
image: offen/docker-volume-backup:latest
image: mazzolino/restic:latest
container_name: backup
profiles:
- backup
@ -9,20 +9,19 @@ services:
env_file:
- env/backup.env
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- backup:/archive
- caddy_data:/backup/caddy_data:ro
- caddy_config:/backup/caddy_config:ro
# - gitea_data:/backup/gitea_data:ro
# - gitea_config:/backup/gitea_config:ro
# - wordpress_db:/backup/wordpress_db:ro
# - wordpress:/backup/wordpress:ro
# - jellyfin_config:/backup/jellyfin_config:ro
# - jellyfin_data:/backup/jellyfin_data:ro
# - jellyfin_cache:/backup/jellyfin_cache:ro
# - qbittorrent_config:/backup/qbittorrent_config:ro
# - qbittorrent_data:/backup/qbittorrent_data:ro
# - uptimekuma_data:/backup/uptimekuma_data:ro
- backup:/mnt/restic
- caddy_data:/data/caddy_data:ro
- caddy_config:/data/caddy_config:ro
# - gitea_data:/data/gitea_data:ro
# - gitea_config:/data/gitea_config:ro
# - wordpress_db:/data/wordpress_db:ro
# - wordpress:/data/wordpress:ro
# - jellyfin_config:/data/jellyfin_config:ro
# - jellyfin_data:/data/jellyfin_data:ro
# - jellyfin_cache:/data/jellyfin_cache:ro
# - qbittorrent_config:/data/qbittorrent_config:ro
# - qbittorrent_data:/data/qbittorrent_data:ro
# - uptimekuma_data:/data/uptimekuma_data:ro
networks:
- infra-network
security_opt:

View File

@ -20,15 +20,10 @@ services:
- env/caddy.env
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
#cap_drop:
# - ALL
cap_add:
# - CHOWN
# - FOWNER
# - DAC_OVERRIDE
# - SETGID
# - SETUID
- NET_BIND_SERVICE
- NET_ADMIN
healthcheck:
test: pidof caddy || exit 1
interval: 120s

View File

@ -1,5 +1,3 @@
version: '3.9'
networks:
infra-network:
driver: bridge

View File

@ -1,25 +0,0 @@
services:
# Openssh
openssh:
image: linuxserver/openssh-server:latest
container_name: openssh
profiles:
- openssh
depends_on:
- caddy
restart: on-failure:5
env_file:
- env/openssh.env
volumes:
- openssh_config:/config
- openssh_data:/data
networks:
- infra-network
security_opt:
- no-new-privileges:true
volumes:
openssh_config:
name: openssh_config
openssh_data:
name: openssh_data

View File

@ -1,5 +1,3 @@
version: '3.9'
volumes:
uptimekuma_data:
name: uptimekuma_data

12
env/backup.env vendored
View File

@ -1,4 +1,8 @@
BACKUP_COMPRESSION="zst"
BACKUP_CRON_EXPRESSION="0 2 * * *"
# BACKUP_RETENTION_DAYS: '7'
# BACKUP_FILENAME="backup-%Y-%m-%dT%H-%M-%S.{{ .Extension }}"
BACKUP_CRON=0 2 * * *
RESTIC_REPOSITORY=/mnt/restic
RESTIC_BACKUP_SOURCES=/data
RESTIC_PASSWORD=7L1Ncbquax0B2TCOmrjaQl9n5mnY88bQ
#RESTIC_BACKUP_ARGS=
#RESTIC_FORGET_ARGS=--prune --keep-last 14 --keep-daily 1
#RESTIC_PRUNE_ARGS=
RESTIC_CHECK_ARGS=--read-data-subset=20%