diff --git a/.env b/.env index 2fc998a..e8263a7 100644 --- a/.env +++ b/.env @@ -1,5 +1,7 @@ -DIR=/home/simon/docker/data -DOMAIN=localhost +UID=1000 +GID=1000 +DIR=/srv/docker +DOMAIN=milvert.com MYSQL_USERNAME=root diff --git a/docker-compose.yml b/docker-compose.yml index 0005cda..c83b6ff 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,6 @@ version: '3' services: - zigbee2mqtt: container_name: zigbee2mqtt networks: @@ -9,10 +8,13 @@ services: image: koenkk/zigbee2mqtt volumes: - ${DIR}/zigbee2matt:/app/data + - ${DIR}/zigbee2mqtt_node_log:/root/.npm devices: - /dev/ttyUSB0:/dev/ttyACM0 restart: always environment: + - UID=1000 + - GID=1000 - TZ=Europe/Stockholm mqtt: @@ -25,11 +27,14 @@ services: ports: - "1883:1883" - "9001:9001" + environment: + - PUID=1000 + - PGID=1000 + - TZ=Europe/Stockholm volumes: - ./mosquitto/mosquitto.conf:/mqtt/mosquitto.conf - ${DIR}/mqtt/data:/mqtt/data - ${DIR}/mqtt/log:/mqtt/log - labels: - "traefik.http.routers.mqtt.rule=Host(`mqtt.${DOMAIN}`)" - "traefik.http.routers.mqtt.entrypoints=mqtt" @@ -58,6 +63,7 @@ services: - "traefik.http.routers.node-red-secure.entrypoints=web-secure" - "traefik.http.routers.node-red-secure.rule=Host(`nodered.${DOMAIN}`)" - "traefik.http.routers.node-red-secure.tls.certresolver=milvert" + - "traefik.http.routers.node-red-secure.tls=true" - "traefik.enable=true" diff --git a/mosquitto/mosquitto.conf b/mosquitto/mosquitto.conf index 374faa5..b983dd9 100644 --- a/mosquitto/mosquitto.conf +++ b/mosquitto/mosquitto.conf @@ -1,7 +1,18 @@ -persistence true -persistence_location /mosquitto/data/ -log_dest file /mosquitto/log/mosquitto.log +pid_file /var/run/mosquitto.pid +persistence true +persistence_location /mqtt/data/ + +user mosquitto + +# Port to use for the default listener. +port 1883 + + +log_dest file /mqtt/log/mosquitto.log +log_dest stdout + +include_dir /mqtt/config listener 1883 diff --git a/static_config.yml b/static_config.yml index 3b407db..1d14b7d 100644 --- a/static_config.yml +++ b/static_config.yml @@ -32,15 +32,6 @@ http: tls: certResolver: milvert - redirect: - rule: "HostRegexp(`{host:.+}`)" # This catches all - middlewares: - - redirect - service: redirectfake-service - entryPoints: - - web - priority: 50 - services: lampa-service: @@ -53,11 +44,6 @@ http: servers: - url: "http://10.0.0.3:5178" - redirectfake-service: - loadBalancer: - servers: - - url: "http://fake" - middlewares: redirect: redirectScheme: diff --git a/syncthing/config/cert.pem b/syncthing/config/cert.pem new file mode 100644 index 0000000..354e95c --- /dev/null +++ b/syncthing/config/cert.pem @@ -0,0 +1,11 @@ +-----BEGIN CERTIFICATE----- +MIIBmzCCASCgAwIBAgIIZwfh5D2Qk8cwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ +c3luY3RoaW5nMB4XDTIwMDYzMDAwMDAwMFoXDTQwMDYyNTAwMDAwMFowFDESMBAG +A1UEAxMJc3luY3RoaW5nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE+mCO/n2FIq4q +wUv2zNo2pZfjCtYRoRLpCFHyV213vcdGgM7s80fHRI3mhfa88JjhmfFS2iDSPfWi +7/B3FSqZXuFZEw3xlH4e+T48mzsTYfs3gFwC1hVVPeypuZCL128Toz8wPTAOBgNV +HQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1Ud +EwEB/wQCMAAwCgYIKoZIzj0EAwIDaQAwZgIxANBE+eHniXGRlaxdTmi0lYgPal5C +CcM8EtugjyvFtbHLlMX37Mp/Ti+ab7iM0ttoeAIxAMs8X2yfIuBlRYz04z/X0PKD +EWVksNGoOcu5VigMmzAESWVYh0WbyM53ZfgzBeVAPg== +-----END CERTIFICATE----- diff --git a/syncthing/config/config.xml b/syncthing/config/config.xml new file mode 100644 index 0000000..1390524 --- /dev/null +++ b/syncthing/config/config.xml @@ -0,0 +1,86 @@ + + + basic + + 1 + + 0 + 0 + 0 + random + false + 0 + 0 + -1 + false + false + false + 25 + .stfolder + false + 0 + 2 + false + standard + + +
dynamic
+ false + false + 0 + 0 + 0 +
+ +
127.0.0.1:8384
+ vxYF9jYeAWW36MaCbbobgCeVGzy5euiY + default +
+ + + default + default + true + true + 21027 + [ff12::8384]:21027 + 0 + 0 + 60 + true + 10 + true + true + 60 + 30 + 10 + -1 + 3 + + https://data.syncthing.net/newdata + false + 1800 + true + 12 + false + 24 + false + 5 + false + 1 + https://upgrades.syncthing.net/meta.json + false + 10 + 0 + ~ + true + 0 + https://crash.syncthing.net/newcrash + true + 180 + 20 + default + auto + 0 + +
diff --git a/syncthing/config/csrftokens.txt b/syncthing/config/csrftokens.txt new file mode 100644 index 0000000..6d9fa51 --- /dev/null +++ b/syncthing/config/csrftokens.txt @@ -0,0 +1,4 @@ +WsxEs7QECkQJyNh6z9AcKFNFVXWdg4xN +Y55VA6zA74RmJfmdkebhXKCMYiUh2bhb +mnkA97ovEvhSkcKXoDirtjVhwUAsc5iC +Y55VA6zA74RmJfmdkebhXKCMYiUh2bhb diff --git a/syncthing/config/https-cert.pem b/syncthing/config/https-cert.pem new file mode 100644 index 0000000..e01a177 --- /dev/null +++ b/syncthing/config/https-cert.pem @@ -0,0 +1,11 @@ +-----BEGIN CERTIFICATE----- +MIIBoDCCASagAwIBAgIIWX3HVi6JAikwCgYIKoZIzj0EAwIwFzEVMBMGA1UEAxMM +OWJlZThiMmJjODgxMB4XDTIwMDYzMDAwMDAwMFoXDTIyMDkyODAwMDAwMFowFzEV +MBMGA1UEAxMMOWJlZThiMmJjODgxMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEBTfW +blOAa5FSqb/pwzMNDdrSIhX6HjoYIgm7IV/xf1o5TL0+PF6CTFBxL3sHpwAsx3xD +PbSGMpX0eLjCAlGkmGoZanYyUb0d91lmDY1jH7hXplaj494y8GoEcwKCvcmJoz8w +PTAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMC +MAwGA1UdEwEB/wQCMAAwCgYIKoZIzj0EAwIDaAAwZQIxAOLNbfE5awUQwKftZ75n +upNDGLeWxWgNHti6G2+nlaLeJJZlIwL5kC82dDuuV2HH4wIwIlfnthBwxrFGNN9q +/Dexa6Ahnz44wgNHY+MjHkfg8sd7NVHrjo7VXnSUQuuZHzKo +-----END CERTIFICATE----- diff --git a/syncthing/config/https-key.pem b/syncthing/config/https-key.pem new file mode 100644 index 0000000..688ddb0 --- /dev/null +++ b/syncthing/config/https-key.pem @@ -0,0 +1,6 @@ +-----BEGIN EC PRIVATE KEY----- +MIGkAgEBBDAiY/SHClITBPOcQtItkOwJbPYlwHy/+dHNsZ5MnD1DXZs7NqIOWW6n +zY+/Pvi0sUugBwYFK4EEACKhZANiAAQFN9ZuU4BrkVKpv+nDMw0N2tIiFfoeOhgi +CbshX/F/WjlMvT48XoJMUHEvewenACzHfEM9tIYylfR4uMICUaSYahlqdjJRvR33 +WWYNjWMfuFemVqPj3jLwagRzAoK9yYk= +-----END EC PRIVATE KEY----- diff --git a/syncthing/config/index-v0.14.0.db/000007.ldb b/syncthing/config/index-v0.14.0.db/000007.ldb new file mode 100644 index 0000000..5db079d Binary files /dev/null and b/syncthing/config/index-v0.14.0.db/000007.ldb differ diff --git a/syncthing/config/index-v0.14.0.db/000008.ldb b/syncthing/config/index-v0.14.0.db/000008.ldb new file mode 100644 index 0000000..19d7151 Binary files /dev/null and b/syncthing/config/index-v0.14.0.db/000008.ldb differ diff --git a/syncthing/config/index-v0.14.0.db/000009.log b/syncthing/config/index-v0.14.0.db/000009.log new file mode 100644 index 0000000..408d2be Binary files /dev/null and b/syncthing/config/index-v0.14.0.db/000009.log differ diff --git a/syncthing/config/index-v0.14.0.db/CURRENT b/syncthing/config/index-v0.14.0.db/CURRENT new file mode 100644 index 0000000..3051f81 --- /dev/null +++ b/syncthing/config/index-v0.14.0.db/CURRENT @@ -0,0 +1 @@ +MANIFEST-000010 diff --git a/syncthing/config/index-v0.14.0.db/CURRENT.bak b/syncthing/config/index-v0.14.0.db/CURRENT.bak new file mode 100644 index 0000000..feda7d6 --- /dev/null +++ b/syncthing/config/index-v0.14.0.db/CURRENT.bak @@ -0,0 +1 @@ +MANIFEST-000000 diff --git a/syncthing/config/index-v0.14.0.db/LOCK b/syncthing/config/index-v0.14.0.db/LOCK new file mode 100644 index 0000000..e69de29 diff --git a/syncthing/config/index-v0.14.0.db/LOG b/syncthing/config/index-v0.14.0.db/LOG new file mode 100644 index 0000000..0e57ddd --- /dev/null +++ b/syncthing/config/index-v0.14.0.db/LOG @@ -0,0 +1,41 @@ +=============== Jun 30, 2020 (CEST) =============== +19:17:45.425828 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed +19:17:45.439384 db@open opening +19:17:45.441530 version@stat F·[] S·0B[] Sc·[] +19:17:45.447873 db@janitor F·2 G·0 +19:17:45.447904 db@open done T·8.491229ms +19:17:46.886797 memdb@flush N·3 S·97B +19:17:46.895029 memdb@flush created L0@3 N·3 S·186B "\ndb..ion,v3":"\nla..ime,v1" +19:17:46.895113 version@stat F·[1] S·186B[186B] Sc·[0.25] +19:17:46.902955 memdb@flush committed F·1 T·16.085023ms +19:17:46.903047 journal@remove removed @1 +19:17:46.903085 table@compaction range L-1 "":"" +19:17:46.903111 table@compaction L0·1 -> L1·0 S·186B Q·3 +19:17:46.911317 table@build created L1@4 N·3 S·186B "\ndb..ion,v3":"\nla..ime,v1" +19:17:46.911396 version@stat F·[0 1] S·186B[0B 186B] Sc·[0.00 0.00] +19:17:46.919371 table@compaction committed F~ S~ Ke·0 D·0 T·16.225129ms +19:17:46.919556 table@remove removed @3 +19:18:45.469927 memdb@flush N·6 S·222B +19:18:45.483100 memdb@flush created L0@6 N·6 S·259B "\x04de..can,v9":"\npr..ion,v4" +19:18:45.483187 version@stat F·[1 1] S·445B[259B 186B] Sc·[0.25 0.00] +19:18:45.491263 memdb@flush committed F·1 T·21.239974ms +19:18:45.491363 journal@remove removed @2 +19:18:45.491402 table@compaction range L-1 "":"" +19:18:45.491429 table@compaction L0·1 -> L1·1 S·445B Q·9 +19:18:45.499511 table@build created L1@7 N·9 S·333B "\x04de..can,v9":"\npr..ion,v4" +19:18:45.499611 version@stat F·[0 1] S·333B[0B 333B] Sc·[0.00 0.00] +19:18:45.508033 table@compaction committed F-1 S-112B Ke·0 D·0 T·16.563551ms +19:18:45.508223 table@remove removed @6 +19:18:45.508284 table@remove removed @4 +21:22:01.085584 db@close closing +21:22:01.086015 db@close done T·428.699µs +=============== Jun 30, 2020 (CEST) =============== +21:22:11.681870 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed +21:22:11.682759 version@stat F·[0 1] S·333B[0B 333B] Sc·[0.00 0.00] +21:22:11.682825 db@open opening +21:22:11.682972 journal@recovery F·1 +21:22:11.690589 journal@recovery recovering @5 +21:22:11.698723 memdb@flush created L0@8 N·2 S·176B "\x04de..can,v11":"\nla..ime,v10" +21:22:11.711560 version@stat F·[1 1] S·509B[176B 333B] Sc·[0.25 0.00] +21:22:11.734535 db@janitor F·4 G·0 +21:22:11.734580 db@open done T·51.737909ms diff --git a/syncthing/config/index-v0.14.0.db/MANIFEST-000010 b/syncthing/config/index-v0.14.0.db/MANIFEST-000010 new file mode 100644 index 0000000..aca4d18 Binary files /dev/null and b/syncthing/config/index-v0.14.0.db/MANIFEST-000010 differ diff --git a/syncthing/config/key.pem b/syncthing/config/key.pem new file mode 100644 index 0000000..2966108 --- /dev/null +++ b/syncthing/config/key.pem @@ -0,0 +1,6 @@ +-----BEGIN EC PRIVATE KEY----- +MIGkAgEBBDATt4bT/HcpqlA6terTY1DKFAMma7I24b1b0OJJxsm0kzD3c1KFwCCO +y9On4T7H3+GgBwYFK4EEACKhZANiAAT6YI7+fYUirirBS/bM2jall+MK1hGhEukI +UfJXbXe9x0aAzuzzR8dEjeaF9rzwmOGZ8VLaINI99aLv8HcVKple4VkTDfGUfh75 +PjybOxNh+zeAXALWFVU97Km5kIvXbxM= +-----END EC PRIVATE KEY----- diff --git a/web/milvert.com/conf/milvert.com.conf b/web/milvert.com/conf/milvert.com.conf new file mode 100644 index 0000000..3487102 --- /dev/null +++ b/web/milvert.com/conf/milvert.com.conf @@ -0,0 +1,15 @@ +server { + + server_name milvert.com www.milvert.com; + + root /html; + + error_log /var/log/nginx/milvert.com.error.log; + access_log /var/log/nginx/milvert.com.access.log; + + listen 80 default_server; + listen [::]:80 default_server; + + + +} diff --git a/web/milvert.com/html/index.html b/web/milvert.com/html/index.html new file mode 100755 index 0000000..dc520ea --- /dev/null +++ b/web/milvert.com/html/index.html @@ -0,0 +1,47 @@ + + +milvert.com + + + + + + + + + + + + +
+ + + + diff --git a/web/milvert.com/html/web.jpg b/web/milvert.com/html/web.jpg new file mode 100755 index 0000000..68b1a6b Binary files /dev/null and b/web/milvert.com/html/web.jpg differ