Initial commit

This commit is contained in:
mr-vercetti 2022-02-03 19:21:52 +00:00
commit a3c9738f2b
9 changed files with 238 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
# Ignore docker env file
docker/.env
# Ignore appdata dir
docker/appdata/

1
README.md Normal file
View File

@ -0,0 +1 @@
# mr-vercetti/homeserver

17
docker/.env.example Normal file
View File

@ -0,0 +1,17 @@
PUID=
PGID=
TIMEZONE=
APPS_DIR=
DATA_DIR=
DOMAIN=
# nextcloud-db
DB_ROOT_PW=
DB_NAME=
DB_USER=
DB_PW=
# wireguard
WG_URL=
WG_PEERS=
WG_ALLOWEDIPS=

View File

@ -0,0 +1,19 @@
version: "3.7"
services:
ddclient:
image: lscr.io/linuxserver/ddclient
container_name: ddclient
networks:
- ddclient
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TIMEZONE}
volumes:
- ${APPS_DIR}/ddclient:/config
restart: unless-stopped
networks:
ddclient:
name: ddclient

View File

@ -0,0 +1,57 @@
version: "3.7"
services:
nextcloud-cache:
image: redis
container_name: nextcloud-cache
networks:
- nextcloud
ports:
- 6379:6379
restart: unless-stopped
nextcloud-db:
image: lscr.io/linuxserver/mariadb
container_name: nextcloud-db
networks:
- nextcloud
environment:
- PUID=1000
- PGID=1000
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PW}
- TZ=${TIMEZONE}
- MYSQL_DATABASE=${DB_NAME}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PW}
volumes:
- ${APPS_DIR}/nextcloud-db:/config
ports:
- 3306:3306
restart: unless-stopped
nextcloud:
image: lscr.io/linuxserver/nextcloud
container_name: nextcloud
networks:
- proxy
- nextcloud
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TIMEZONE}
volumes:
- ${APPS_DIR}/nextcloud:/config
- ${DATA_DIR}/nextcloud-data:/data
ports:
- 8443:443
restart: unless-stopped
depends_on:
- nextcloud-db
- nextcloud-cache
networks:
proxy:
external:
name: proxy
nextcloud:
name: nextcloud

View File

@ -0,0 +1,28 @@
version: "3.7"
services:
swag:
image: lscr.io/linuxserver/swag
container_name: swag
networks:
- proxy
cap_add:
- NET_ADMIN
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TIMEZONE}
- URL=${DOMAIN}
- SUBDOMAINS=wildcard
- VALIDATION=dns
- DNSPLUGIN=cloudflare
volumes:
- ${APPS_DIR}/swag:/config
ports:
- 443:443
- 80:80
restart: unless-stopped
networks:
proxy:
name: proxy

View File

@ -0,0 +1,36 @@
version: "3.7"
services:
wireguard:
image: lscr.io/linuxserver/wireguard
container_name: wireguard
networks:
- wireguard
- proxy
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TIMEZONE}
- SERVERURL=${WG_URL}
- SERVERPORT=51820
- PEERS=${WG_PEERS}
- PEERDNS=auto
- ALLOWEDIPS=${WG_ALLOWEDIPS}
volumes:
- ${APPS_DIR}/wireguard:/config
- /lib/modules:/lib/modules
ports:
- 51820:51820/udp
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
restart: unless-stopped
networks:
proxy:
external:
name: proxy
wireguard:
name: wireguard

View File

@ -0,0 +1,42 @@
[snapraid]
; path to the snapraid executable (e.g. /bin/snapraid)
executable = /usr/local/bin/snapraid
; path to the snapraid config to be used
config = /etc/snapraid.conf
; abort operation if there are more deletes than this, set to -1 to disable
deletethreshold = 40
; if you want touch to be ran each time
touch = false
[logging]
; logfile to write to, leave empty to disable
file = /var/log/snapraid.log
; maximum logfile size in KiB, leave empty for infinite
maxsize = 5000
[email]
; when to send an email, comma-separated list of [success, error]
sendon = success,error
; set to false to get full programm output via email
short = true
subject = [SnapRAID] Status Report:
from =
to =
; maximum email size in KiB
maxsize = 500
[smtp]
host =
; leave empty for default port
port =
; set to "true" to activate
ssl = false
tls = false
user =
password =
[scrub]
; set to true to run scrub after sync
enabled = true
percentage = 12
older-than = 10

33
snapraid/snapraid.conf Normal file
View File

@ -0,0 +1,33 @@
# Defines the file to use as parity storage
# It must NOT be in a data disk
# Format: "parity FILE_PATH"
parity /mnt/parity/snapraid.parity
# Defines the files to use as content list
# You can use multiple specification to store more copies
# You must have least one copy for each parity file plus one. Some more don't
# hurt
# They can be in the disks used for data, parity or boot,
# but each file must be in a different disk
# Format: "content FILE_PATH"
content /var/snapraid.content
content /mnt/disk1/.snapraid.content
# Defines the data disks to use
# The order is relevant for parity, do not change it
# Format: "disk DISK_NAME DISK_MOUNT_POINT"
disk d1 /mnt/disk1
# Excludes hidden files and directories (uncomment to enable).
#nohidden
# Defines files and directories to exclude
# Remember that all the paths are relative at the mount points
# Format: "exclude FILE"
# Format: "exclude DIR/"
# Format: "exclude /PATH/FILE"
# Format: "exclude /PATH/DIR/"
exclude *.unrecoverable
exclude /tmp/
exclude /lost+found/
exclude *.!sync