Merge branch 'restarts' into 'master'

Restarts

See merge request cyber5k/mistborn!5
This commit is contained in:
Steven Foerster
2020-03-11 03:58:57 +00:00
11 changed files with 19 additions and 26 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ defaultEntryPoints = ["http"]
[frontends.homeassistant.headers]
HostsProxyHeaders = ['X-CSRFToken']
[frontends.homeassistant.routes.dr1]
rule = "Host:hass.mistborn"
rule = "Host:homeassistant.mistborn"
[frontends.syncthing]
backend = "syncthing"
-3
View File
@@ -1,8 +1,5 @@
version: '3'
#volumes:
# production_bitwarden_data: {}
services:
bitwarden:
image: bitwardenrs/server:latest
-1
View File
@@ -12,7 +12,6 @@ services:
- "traefik.enable=true"
- "traefik.port=8123"
restart: unless-stopped
#network_mode: host
networks:
default:
-1
View File
@@ -3,7 +3,6 @@ version: '3'
volumes:
production_jellyfin_config: {}
production_jellyfin_cache: {}
#production_nextcloud: {}
services:
jellyfin:
-7
View File
@@ -1,8 +1,5 @@
version: '3'
#volumes:
# production_nextcloud: {}
services:
nextcloud:
image: nextcloud
@@ -15,10 +12,6 @@ services:
- "traefik.port=80"
volumes:
- ../../mistborn_volumes/extra/nextcloud:/var/www/html
#- ./volumes/extra/nextcloud/config:/var/www/html/config
#- ./volumes/extra/nextcloud/custom_apps:/var/www/html/custom_apps
#- ./volumes/extra/nextcloud/data:/var/www/html/data
#- ./volumes/extra/nextcloud/themes:/var/www/html/themes
environment:
- VIRTUAL_HOST=nextcloud.mistborn
restart: unless-stopped
-1
View File
@@ -13,7 +13,6 @@ services:
- "traefik.enable=true"
- "traefik.port=80"
restart: unless-stopped
#network_mode: host
networks:
default:
-2
View File
@@ -15,9 +15,7 @@ services:
- ../.envs/.production/.pihole
command: /start
volumes:
#- ~/.ssh:/ssh:ro
- ../../mistborn_volumes/extra/raspap/etc-raspap:/etc/raspap
#- ../volumes/extra/raspap/etc-lighttpd:/etc/lighttpd
networks:
default:
+10 -8
View File
@@ -163,14 +163,14 @@ sudo systemctl restart unattended-upgrades
# install and start base services
# default interface
sudo cp ./scripts/services/Mistborn* /etc/systemd/system/
sudo find /etc/systemd/system/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/User=.*/User=$USER/"
sudo find /etc/systemd/system/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/ root:root / $USER:$USER /"
sudo find /etc/systemd/system/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/User=root/User=$USER/"
#sudo find /etc/systemd/system/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/ root:root / $USER:$USER /"
sudo find /etc/systemd/system/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/DIFACE/$iface/"
if [ "$DISTRO" == "debian" ] || [ "$DISTRO" == "raspbian" ]; then
# remove systemd-resolved lines
sudo sed -i '/.*systemd-resolved/d' /etc/systemd/system/Mistborn-base.service
fi
#if [ "$DISTRO" == "debian" ] || [ "$DISTRO" == "raspbian" ]; then
# # remove systemd-resolved lines
# sudo sed -i '/.*systemd-resolved/d' /etc/systemd/system/Mistborn-base.service
#fi
# setup local volumes for pihole
sudo mkdir -p ../mistborn_volumes/
@@ -188,14 +188,16 @@ sudo sed -i "s/IPV4_PUBLIC/$IPV4_PUBLIC/" ./compose/production/traefik/traefik.t
sudo docker-compose -f base.yml pull || true
sudo docker-compose -f base.yml build
# DNS
## disable other DNS services
sudo systemctl stop systemd-resolved 2>/dev/null || true
sudo systemctl disable systemd-resolved 2>/dev/null || true
sudo systemctl stop dnsmasq 2>/dev/null || true
sudo systemctl disable dnsmasq 2>/dev/null || true
# array of dns entries to add (not not already present)
declare -a dnslist=("pihole.mistborn" \
"home.mistborn" \
"hass.mistborn" \
"homeassistant.mistborn" \
"syncthing.mistborn" \
"chat.mistborn" \
"tor.mistborn" \
-2
View File
@@ -12,7 +12,6 @@ PermissionsStartOnly=true
ExecStartPre=/usr/local/bin/docker-compose -f /opt/mistborn/base.yml down
ExecStartPre=/usr/local/bin/docker-compose -f /opt/mistborn/base.yml build
ExecStartPre=/bin/systemctl stop systemd-resolved
ExecStartPre=/sbin/iptables -I DOCKER-USER -i DIFACE -p udp --dport 53 -j MISTBORN_LOG_DROP
ExecStartPre=/sbin/iptables -I DOCKER-USER -i DIFACE -p tcp --dport 53 -j MISTBORN_LOG_DROP
ExecStartPre=/sbin/iptables -I DOCKER-USER -i DIFACE -p tcp --dport 80 -j MISTBORN_LOG_DROP
@@ -31,7 +30,6 @@ ExecStopPost=/sbin/iptables -D DOCKER-USER -i DIFACE -p tcp --dport 80 -j MISTBO
ExecStopPost=/sbin/iptables -D DOCKER-USER -i DIFACE -p tcp --dport 5555 -j MISTBORN_LOG_DROP
ExecStopPost=/sbin/iptables -D OUTPUT -o DIFACE -p udp --dport 53 -j MISTBORN_LOG_DROP
ExecStopPost=/sbin/ip6tables -D OUTPUT -p udp --dport 53 -j MISTBORN_LOG_DROP
ExecStopPost=/bin/systemctl start systemd-resolved
[Install]
WantedBy=multi-user.target
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
set -e
docker-compose -f /opt/mistborn/base.yml pull
docker-compose -f /opt/mistborn/base.yml build
systemctl restart Mistborn-base