initial plugins
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
syncthing:
|
||||
image: linuxserver/syncthing:latest
|
||||
container_name: mistborn_production_syncthing
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=Amereica/New_York
|
||||
- UMASK_SET=022
|
||||
volumes:
|
||||
- ../../mistborn_volumes/extra/syncthing/config:/config
|
||||
- ../../mistborn_volumes/extra/syncthing/data1:/data1
|
||||
- ../../mistborn_volumes/extra/syncthing/data2:/data2
|
||||
ports:
|
||||
#- 8384:8384
|
||||
- "${MISTBORN_BIND_IP}:22000:22000/tcp" # listening port
|
||||
- "${MISTBORN_BIND_IP}:21027:21027/udp" # protocol discovery
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.syncthing-http.rule=Host(`syncthing.mistborn`)"
|
||||
- "traefik.http.routers.syncthing-http.entrypoints=web"
|
||||
- "traefik.http.routers.syncthing-http.middlewares=mistborn_auth@file"
|
||||
- "traefik.http.routers.syncthing-https.rule=Host(`syncthing.mistborn`)"
|
||||
- "traefik.http.routers.syncthing-https.entrypoints=websecure"
|
||||
- "traefik.http.routers.syncthing-https.middlewares=mistborn_auth@file"
|
||||
- "traefik.http.routers.syncthing-https.tls.certresolver=basic"
|
||||
- "traefik.http.services.syncthing-service.loadbalancer.server.port=8384"
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: mistborn_default
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
@@ -0,0 +1,8 @@
|
||||
[DEFAULT]
|
||||
name = syncthing
|
||||
subdomain = syncthing
|
||||
desc = Syncthing is a free, open-source peer-to-peer file synchronization application available for Windows, Mac, Linux, Android, Solaris, Darwin, and BSD. It can sync files between devices on a local network, or between remote devices over the Internet. Data security and data safety are built into the design of the software.
|
||||
img = img/syncthing.png
|
||||
compose = compose/docker-compose.yml
|
||||
service = service/plugin.service
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
[Unit]
|
||||
Description=Mistborn Syncthing Service
|
||||
Requires=Mistborn-base.service
|
||||
After=Mistborn-base.service
|
||||
PartOf=Mistborn-base.service
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=15
|
||||
User=root
|
||||
Group=docker
|
||||
PermissionsStartOnly=true
|
||||
# Shutdown container (if running) when unit is stopped
|
||||
ExecStartPre=/opt/mistborn/scripts/wrappers/mistborn_docker.sh syncthing docker-compose -f /opt/mistborn/extra/syncthing.yml down
|
||||
|
||||
ExecStartPre=/sbin/iptables -w -I DOCKER-USER -i DIFACE -p udp --dport 21027 -j MISTBORN_LOG_DROP
|
||||
ExecStartPre=/sbin/iptables -w -I DOCKER-USER -i DIFACE -p tcp --dport 22000 -j MISTBORN_LOG_DROP
|
||||
# Start container when unit is started
|
||||
ExecStart=/opt/mistborn/scripts/wrappers/mistborn_docker.sh syncthing docker-compose -f /opt/mistborn/extra/syncthing.yml up --build
|
||||
# Stop container when unit is stopped
|
||||
ExecStop=/opt/mistborn/scripts/wrappers/mistborn_docker.sh syncthing docker-compose -f /opt/mistborn/extra/syncthing.yml down
|
||||
# Post stop
|
||||
ExecStopPost=-/sbin/iptables -D DOCKER-USER -i DIFACE -p udp --dport 21027 -j MISTBORN_LOG_DROP
|
||||
ExecStopPost=-/sbin/iptables -D DOCKER-USER -i DIFACE -p tcp --dport 22000 -j MISTBORN_LOG_DROP
|
||||
|
||||
[Install]
|
||||
WantedBy=Mistborn-base.service
|
||||
Reference in New Issue
Block a user