diff --git a/server/config/.gitignore b/server/config/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/server/config/.gitmodules b/server/config/.gitmodules new file mode 100644 index 0000000..9114ea0 --- /dev/null +++ b/server/config/.gitmodules @@ -0,0 +1,6 @@ +[submodule "ass/ass"] + path = ass/ass + url = https://github.com/tycrek/ass.git +[submodule "exatorrent/exatorrent"] + path = exatorrent/exatorrent + url = git@github.com:Jafner/exatorrent.git diff --git a/server/config/arr/.env b/server/config/arr/.env new file mode 100644 index 0000000..8d1f459 --- /dev/null +++ b/server/config/arr/.env @@ -0,0 +1,4 @@ +DOCKER_DATA=/home/joey/docker_data/arr +MEDIA_DIR=/mnt/media +DOWNLOAD_DIR=/mnt/md0/torrenting/NZB +INCOMPLETE_DOWNLOAD_DIR=/mnt/md0/torrenting/NZB_incomplete diff --git a/server/config/arr/docker-compose.yml b/server/config/arr/docker-compose.yml new file mode 100644 index 0000000..d5b1b6e --- /dev/null +++ b/server/config/arr/docker-compose.yml @@ -0,0 +1,82 @@ +version: "3" +services: + radarr: + image: linuxserver/radarr + container_name: radarr + networks: + - web + environment: + - PUID=1000 + - PGID=1000 + - TZ=America/Los_Angeles + volumes: + - "${MEDIA_DIR}/Video/Movies:/movies" + - "${DOCKER_DATA}/radarr_config:/config" + - "${DOWNLOAD_DIR}:/downloads" + labels: + - traefik.http.routers.radarr.rule=Host(`radarr.jafner.net`) + - traefik.http.routers.radarr.tls.certresolver=lets-encrypt + - traefik.http.services.radarr.loadbalancer.server.port=7878 + - traefik.http.routers.radarr.middlewares=lan-only@file + sonarr: + image: linuxserver/sonarr + container_name: sonarr + networks: + - web + environment: + - PUID=1000 + - PGID=1000 + - TZ=America/Los_Angeles + volumes: + - "${MEDIA_DIR}/Video/Shows:/shows" + - "${DOCKER_DATA}/sonarr_config:/config" + - "${DOWNLOAD_DIR}:/downloads" + labels: + - traefik.http.routers.sonarr.rule=Host(`sonarr.jafner.net`) + - traefik.http.routers.sonarr.tls.certresolver=lets-encrypt + - traefik.http.services.sonarr.loadbalancer.server.port=8989 + - traefik.http.routers.sonarr.middlewares=lan-only@file + + nzbhydra2: + image: linuxserver/nzbhydra2 + container_name: nzbhydra2 + networks: + - web + environment: + - PUID=1000 + - PGID=1000 + - TZ=America/Los_Angeles + volumes: + - "${DOCKER_DATA}/nzbhydra2_config:/config" + - "${DOWNLOAD_DIR}:/downloads" + labels: + - traefik.http.routers.nzbhydra2.rule=Host(`nzbhydra.jafner.net`) + - traefik.http.routers.nzbhydra2.tls.certresolver=lets-encrypt + - traefik.http.services.nzbhydra2.loadbalancer.server.port=5076 + - traefik.http.routers.nzbhydra2.middlewares=lan-only@file + + sabnzbd: + image: linuxserver/sabnzbd + container_name: sabnzbd + networks: + - web + environment: + - PUID=1000 + - PGID=1000 + - TZ=America/Los_Angeles + ports: + - 8085:8080 + volumes: + - "${DOCKER_DATA}/sabnzbd_config:/config" + - "${DOWNLOAD_DIR}:/downloads" + - "${INCOMPLETE_DOWNLOAD_DIR}:/incomplete-downloads" + labels: + - traefik.http.routers.sabnzbd.rule=Host(`sabnzbd.jafner.net`) + - traefik.http.routers.sabnzbd.tls.certresolver=lets-encrypt + - traefik.http.services.sabnzbd.loadbalancer.server.port=8080 + - traefik.http.routers.sabnzbd.middlewares=lan-only@file + +networks: + web: + external: true + diff --git a/server/config/ass/.env b/server/config/ass/.env new file mode 100644 index 0000000..7a257e8 --- /dev/null +++ b/server/config/ass/.env @@ -0,0 +1,2 @@ +DOCKER_DATA=/home/joey/docker_data/ass + diff --git a/server/config/ass/auth.json b/server/config/ass/auth.json new file mode 100644 index 0000000..5c536b2 --- /dev/null +++ b/server/config/ass/auth.json @@ -0,0 +1,12 @@ +{ + "users": { + "cc5e88283c0d43d8a929c8c02e748f5a": { + "username": "ass", + "count": 9 + }, + "23780fc6458d4774bea2ff5c027f0889": { + "username": "ace", + "count": 0 + } + } +} diff --git a/server/config/ass/config.json b/server/config/ass/config.json new file mode 100644 index 0000000..c507694 --- /dev/null +++ b/server/config/ass/config.json @@ -0,0 +1,28 @@ +{ + "host": "0.0.0.0", + "port": 40115, + "domain": "share.jafner.net", + "maxUploadSize": 1024, + "isProxied": true, + "useSsl": true, + "resourceIdSize": 12, + "resourceIdType": "random", + "spaceReplace": "_", + "gfyIdSize": 2, + "mediaStrict": false, + "viewDirect": false, + "dataEngine": "@tycrek/papito", + "frontendName": "ass-x", + "indexFile": "", + "useSia": false, + "s3enabled": false, + "s3endpoint": "sfo3.digitaloceanspaces.com", + "s3bucket": "bucket-name", + "s3usePathStyle": false, + "s3accessKey": "accessKey", + "s3secretKey": "secretKey", + "__WARNING__": "The following configs are no longer used and are here for backwards compatibility. For optimal use, DO NOT edit them.", + "diskFilePath": "uploads/", + "saveWithDate": true, + "saveAsOriginal": false +} diff --git a/server/config/ass/data.json b/server/config/ass/data.json new file mode 100644 index 0000000..e721edd --- /dev/null +++ b/server/config/ass/data.json @@ -0,0 +1,218 @@ +{ + "XJ7RxSB3H6sL": { + "encoding": "7bit", + "mimetype": "image/png", + "ext": ".png", + "originalname": "Test.png", + "path": "uploads/2022-01/f8f0d045205bf5dd7cc9abdaf6ec4b2cfdd66e31", + "randomId": "IYf0QwXvJ5VnlxfH3rZIx7897DAh3JjV", + "deleteId": "UotPU14x96CQTgPFBSfNpMx5zbhUwWbf", + "is": { + "image": true, + "video": false, + "audio": false, + "other": false + }, + "thumbnail": "IYf0QwXvJ5VnlxfH3rZIx7897DAh3JjV.thumbnail.jpg", + "vibrant": "#04af24", + "sha1": "f8f0d045205bf5dd7cc9abdaf6ec4b2cfdd66e31", + "size": 27422, + "domain": "https://share.jafner.net", + "timestamp": 1641830424260, + "timeoffset": "UTC+0", + "token": "cc5e88283c0d43d8a929c8c02e748f5a", + "opengraph": {} + }, + "CVySsKV97iWW": { + "encoding": "7bit", + "mimetype": "image/png", + "ext": ".png", + "originalname": "firefox_uqCMkJWqLh.png", + "path": "uploads/2022-01/09560e7135f99b35824851b7333e02986c92d594", + "randomId": "G41NiAjfpdQWOjyTZ4DTjXO5WJOerGNj", + "deleteId": "jRstfk0SZHjaBSaQz9IIaj3scsXJQsyo", + "is": { + "image": true, + "video": false, + "audio": false, + "other": false + }, + "thumbnail": "G41NiAjfpdQWOjyTZ4DTjXO5WJOerGNj.thumbnail.jpg", + "vibrant": "#fa7c14", + "sha1": "09560e7135f99b35824851b7333e02986c92d594", + "size": 61175, + "domain": "https://share.jafner.net", + "timestamp": 1641830572175, + "timeoffset": "UTC+0", + "token": "cc5e88283c0d43d8a929c8c02e748f5a", + "opengraph": {} + }, + "fmv0ZHwr7l2A": { + "encoding": "7bit", + "mimetype": "application/x-msdownload", + "ext": ".exe", + "originalname": "ShareX-13.7.0-setup.exe", + "path": "uploads/2022-01/d98e48f0e1c0c48b0b2526488d6775d1459d434e", + "randomId": "zAwZRT1XeC0hHWN0JwSgSRN6xfIkUH3E", + "deleteId": "ndarm2QTwB6s0QRCNBe5wiDUCUrMAtoQ", + "is": { + "image": false, + "video": false, + "audio": false, + "other": true + }, + "thumbnail": "views/ass-file-icon.png", + "vibrant": "#554C7F", + "sha1": "d98e48f0e1c0c48b0b2526488d6775d1459d434e", + "size": 7417058, + "domain": "https://share.jafner.net", + "timestamp": 1641830644900, + "timeoffset": "UTC+0", + "token": "cc5e88283c0d43d8a929c8c02e748f5a", + "opengraph": {} + }, + "WuYvCcRNXp95": { + "encoding": "7bit", + "mimetype": "application/pdf", + "ext": ".pdf", + "originalname": "The_Wild_Beyond_the_Witchlight.pdf", + "path": "uploads/2022-01/1b6e61d5744b7277d3f274ed94d2f1ba89c184d9", + "randomId": "EntmccCR8Fut6qOgxNtCdUgLV0zbJNWq", + "deleteId": "zClYdX5SL17uFHlmdVUDzbp0bT0UTN0h", + "is": { + "image": false, + "video": false, + "audio": false, + "other": true + }, + "thumbnail": "views/ass-file-icon.png", + "vibrant": "#F7FA5D", + "sha1": "1b6e61d5744b7277d3f274ed94d2f1ba89c184d9", + "size": 198505536, + "domain": "https://share.jafner.net", + "timestamp": 1641830949070, + "timeoffset": "UTC+0", + "token": "cc5e88283c0d43d8a929c8c02e748f5a", + "opengraph": {} + }, + "ewfc7CfA8bbK": { + "encoding": "7bit", + "mimetype": "video/x-matroska", + "ext": ".mkv", + "originalname": "Replay_2022-01-10_08-35-21.mkv", + "path": "uploads/2022-01/a00a5a865f80a6334b0d300b3e52af2d2d640cde", + "randomId": "SfrVVLblBa84SXBuOKZDXym5q6ExbJNG", + "deleteId": "NGZLnA2MH8EVx8MzaGPGWr4VvlLphZ8I", + "is": { + "image": false, + "video": true, + "audio": false, + "other": false + }, + "thumbnail": "SfrVVLblBa84SXBuOKZDXym5q6ExbJNG.thumbnail.jpg", + "vibrant": "#07BEDA", + "sha1": "a00a5a865f80a6334b0d300b3e52af2d2d640cde", + "size": 222311197, + "domain": "https://share.jafner.net", + "timestamp": 1641832599727, + "timeoffset": "UTC+0", + "token": "cc5e88283c0d43d8a929c8c02e748f5a", + "opengraph": {} + }, + "DRpeI0FZ8O7z": { + "encoding": "7bit", + "mimetype": "application/vnd.ms-pki.stl", + "ext": ".stl", + "originalname": "Kazin.stl", + "path": "uploads/2022-01/7bed4ce372c794cd6beb3286ad7a082400fbc933", + "randomId": "yXSUnUW2nRKnPYhaMTnXB6em2wm5Puld", + "deleteId": "Mj83HWVGRz440GADyUZRXfC1HA8IIywa", + "is": { + "image": false, + "video": false, + "audio": false, + "other": true + }, + "thumbnail": "views/ass-file-icon.png", + "vibrant": "#BF8B70", + "sha1": "7bed4ce372c794cd6beb3286ad7a082400fbc933", + "size": 45095484, + "domain": "https://share.jafner.net", + "timestamp": 1642796578264, + "timeoffset": "UTC+0", + "token": "cc5e88283c0d43d8a929c8c02e748f5a", + "opengraph": {} + }, + "ax8ohlADSGbc": { + "encoding": "7bit", + "mimetype": "image/jpeg", + "ext": ".jpg", + "originalname": "Overwatch_6WdLlLXVje.jpg", + "path": "uploads/2022-01/60b8e3543abf0cf944bb9ab1cd739378cc874e07", + "randomId": "U74vZU95KS3KWKGnJ2P6rjPmAzCchxAQ", + "deleteId": "203s9JNZ3XwP2LR2fE2axkNM2Amb5hTD", + "is": { + "image": true, + "video": false, + "audio": false, + "other": false + }, + "thumbnail": "U74vZU95KS3KWKGnJ2P6rjPmAzCchxAQ.thumbnail.jpg", + "vibrant": "#543141", + "sha1": "60b8e3543abf0cf944bb9ab1cd739378cc874e07", + "size": 436632, + "domain": "https://share.jafner.net", + "timestamp": 1642976189467, + "timeoffset": "UTC+0", + "token": "cc5e88283c0d43d8a929c8c02e748f5a", + "opengraph": {} + }, + "dHJcDIgr8UfN": { + "encoding": "7bit", + "mimetype": "image/jpeg", + "ext": ".jpg", + "originalname": "Overwatch_HdTgc7eO0D.jpg", + "path": "uploads/2022-01/5bc0fc847ef06628d9a5e52d617c8b0d47283a75", + "randomId": "JxehS26C39uYk9ClZyXziqgcAHzcM0qx", + "deleteId": "58L1XPjSiJ3EkXND1lGzA67hZqKo9x30", + "is": { + "image": true, + "video": false, + "audio": false, + "other": false + }, + "thumbnail": "JxehS26C39uYk9ClZyXziqgcAHzcM0qx.thumbnail.jpg", + "vibrant": "#57323c", + "sha1": "5bc0fc847ef06628d9a5e52d617c8b0d47283a75", + "size": 480224, + "domain": "https://share.jafner.net", + "timestamp": 1642976236765, + "timeoffset": "UTC+0", + "token": "cc5e88283c0d43d8a929c8c02e748f5a", + "opengraph": {} + }, + "oeVcp8G0Tbw4": { + "encoding": "7bit", + "mimetype": "image/jpeg", + "ext": ".jpg", + "originalname": "firefox_BzcecQhJSM.jpg", + "path": "uploads/2022-01/b510275fc5a468373e5fd87617caef8b3820043e", + "randomId": "jhn7DQS2ZhDyt4j7IfMPQzQklht3iZhK", + "deleteId": "mZNtmvi8nYlzfi5gobNbplQDk2erfHtk", + "is": { + "image": true, + "video": false, + "audio": false, + "other": false + }, + "thumbnail": "jhn7DQS2ZhDyt4j7IfMPQzQklht3iZhK.thumbnail.jpg", + "vibrant": "#2c3444", + "sha1": "b510275fc5a468373e5fd87617caef8b3820043e", + "size": 704904, + "domain": "https://share.jafner.net", + "timestamp": 1643042244380, + "timeoffset": "UTC+0", + "token": "cc5e88283c0d43d8a929c8c02e748f5a", + "opengraph": {} + } +} diff --git a/server/config/ass/docker-compose.yml b/server/config/ass/docker-compose.yml new file mode 100644 index 0000000..614fe24 --- /dev/null +++ b/server/config/ass/docker-compose.yml @@ -0,0 +1,38 @@ +version: "3.6" +services: + ass: + build: ./ass + command: npm start + container_name: ass + restart: unless-stopped + networks: + - web + ports: + - "40115:40115" + volumes: + - ${DOCKER_DATA}/uploads:/opt/ass/uploads + - ${DOCKER_DATA}/share:/opt/ass/share + - type: bind + source: ./config.json + target: /opt/ass/config.json + - type: bind + source: ./auth.json + target: /opt/ass/auth.json + - type: bind + source: ./data.json + target: /opt/ass/data.json + tmpfs: /tmp # temp files such as uploads are stored here + working_dir: /opt/ass + tty: true + environment: + - NODE_ENV=production # for production + - ASS_ENV=docker # docker, local, production (not widely used yet) + - LOG_LEVEL=debug # debug, info, warn, error + - FORCE_COLOR=3 # force color output + labels: + - traefik.http.routers.ass.rule=Host(`share.jafner.net`) + - traefik.http.routers.ass.tls.certresolver=lets-encrypt + +networks: + web: + external: true diff --git a/server/config/authentik/.env b/server/config/authentik/.env new file mode 100644 index 0000000..ba8c8e1 --- /dev/null +++ b/server/config/authentik/.env @@ -0,0 +1,25 @@ +DOCKER_DATA=/home/joey/docker_data/authentik + +PG_PASS=jTB6Se9YYvSy6NXMYLh7PyCvDauW9V6wkhmFQTMS +AUTHENTIK_SECRET_KEY=HXWqo5Cd3ezSKB8oPxM6sccXoADwqWTJJBPfmn7M + +AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server +AUTHENTIK_TAG=gh-next +AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-next + + +############## EMAIL STUFF ################# +# SMTP Host Emails are sent to +AUTHENTIK_EMAIL__HOST=localhost +AUTHENTIK_EMAIL__PORT=25 +# Optionally authenticate (don't add quotation marks to you password) +AUTHENTIK_EMAIL__USERNAME= +AUTHENTIK_EMAIL__PASSWORD= +# Use StartTLS +AUTHENTIK_EMAIL__USE_TLS=false +# Use SSL +AUTHENTIK_EMAIL__USE_SSL=false +AUTHENTIK_EMAIL__TIMEOUT=10 +# Email address authentik will send from, should have a correct @domain +AUTHENTIK_EMAIL__FROM=authentik@localhost + diff --git a/server/config/authentik/docker-compose.yml b/server/config/authentik/docker-compose.yml new file mode 100644 index 0000000..30afc0b --- /dev/null +++ b/server/config/authentik/docker-compose.yml @@ -0,0 +1,88 @@ +version: '3.2' + +services: + postgresql: + image: postgres:12-alpine + restart: unless-stopped + networks: + - authentik + volumes: + - database:/var/lib/postgresql/data + environment: + - POSTGRES_PASSWORD=${PG_PASS} + - POSTGRES_USER=${PG_USER:-authentik} + - POSTGRES_DB=${PG_DB:-authentik} + env_file: + - .env + + redis: + image: redis:alpine + networks: + - authentik + restart: unless-stopped + + server: + image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2022.1.3} + networks: + authentik: + web: + aliases: + - authentik-server + #ports: + # - 9000:9000 + restart: unless-stopped + command: server + environment: + AUTHENTIK_HOST: http://authentik-server:9000 + AUTHENTIK_HOST_BROWSER: https://authentik.jafner.net + AUTHENTIK_REDIS__HOST: redis + AUTHENTIK_POSTGRESQL__HOST: postgresql + AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik} + AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik} + AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS} + volumes: + - ${DOCKER_DATA}/media:/media + - ${DOCKER_DATA}/custom-templates:/templates + env_file: + - .env + labels: + traefik.http.routers.authentik.priority: 1 + traefik.http.routers.authentik.rule: Host(`authentik.jafner.net`) + traefik.http.routers.authentik.tls.certresolver: lets-encrypt + traefik.http.services.authentik.loadbalancer.server.port: 9000 + traefik.http.middlewares.authentik.forwardauth.address: http://ak-outpost-forward-auth:9000/akprox/auth/traefik + traefik.http.middlewares.authentik.forwardauth.trustForwardHeader: true + traefik.http.middlewares.authentik.forwardauth.authResponseHeaders: X-authentik-username,X-authentik-groups,X-authentik-email,X-authentik-name,X-authentik-uid,X-authentik-jwt,X-authentik-meta-jwks,X-authentik-meta-outpost,X-authentik-meta-provider,X-authentik-meta-app,X-authentik-meta-version + + worker: + image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2022.1.3} + restart: unless-stopped + networks: + - authentik + command: worker + environment: + AUTHENTIK_REDIS__HOST: redis + AUTHENTIK_POSTGRESQL__HOST: postgresql + AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik} + AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik} + AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS} + user: root + volumes: + - ${DOCKER_DATA}/backups:/backups + - ${DOCKER_DATA}/media:/media + - ${DOCKER_DATA}/certs:/certs + - /var/run/docker.sock:/var/run/docker.sock + - ${DOCKER_DATA}/custom-templates:/templates + env_file: + - .env + labels: + traefik.enable: false + +volumes: + database: + driver: local + +networks: + authentik: + web: + external: true diff --git a/server/config/calibre-web/.env b/server/config/calibre-web/.env new file mode 100644 index 0000000..27e0058 --- /dev/null +++ b/server/config/calibre-web/.env @@ -0,0 +1 @@ +LIBRARY_DIR=/mnt/nas/Ebooks/Calibre \ No newline at end of file diff --git a/server/config/calibre-web/docker-compose.yml b/server/config/calibre-web/docker-compose.yml new file mode 100644 index 0000000..c895dee --- /dev/null +++ b/server/config/calibre-web/docker-compose.yml @@ -0,0 +1,78 @@ +version: '3' +services: + calibre-web-rpg: + image: linuxserver/calibre-web + container_name: calibre-web-rpg + environment: + - PUID=1000 + - PGID=1000 + - TZ=America/Los_Angeles + volumes: + - calibre-web-rpg_data:/config + - /mnt/calibre/rpg:/books + labels: + - traefik.http.routers.calibre-rpg.rule=Host(`calibre-rpg.jafner.net`) + - traefik.http.routers.calibre-rpg.tls.certresolver=lets-encrypt + #- traefik.http.routers.calibre-rpg.middlewares=authentik@docker + networks: + - web + + calibre-web-sff: + image: linuxserver/calibre-web + container_name: calibre-web-sff + environment: + - PUID=1000 + - PGID=1000 + - TZ=America/Los_Angeles + volumes: + - calibre-web-sff_data:/config + - /mnt/calibre/sff:/books + labels: + - traefik.http.routers.calibre-sff.rule=Host(`calibre-sff.jafner.net`) + - traefik.http.routers.calibre-sff.tls.certresolver=lets-encrypt + #- traefik.http.routers.calibre-sff.middlewares=authentik@docker + networks: + - web + + calibre-web-ace: + image: linuxserver/calibre-web + container_name: calibre-web-ace + environment: + - PUID=1000 + - PGID=1000 + - TZ=America/Los_Angeles + volumes: + - calibre-web-ace_data:/config + - /mnt/md0/calibre/ace:/books + labels: + - traefik.http.routers.calibre-ace.rule=Host(`calibre-ace.jafner.net`) + - traefik.http.routers.calibre-ace.tls.certresolver=lets-encrypt + #- traefik.http.routers.calibre-ace.middlewares=authentik@docker + networks: + - web + + calibre-web-dev: + image: linuxserver/calibre-web + container_name: calibre-web-dev + environment: + - PUID=1000 + - PGID=1000 + - TZ=America/Los_Angeles + volumes: + - calibre-web-dev_data:/config + - /mnt/md0/calibre/dev:/books + labels: + - traefik.http.routers.calibre-dev.rule=Host(`calibre-dev.jafner.net`) + - traefik.http.routers.calibre-dev.tls.certresolver=lets-encrypt + - traefik.http.routers.calibre-dev.middlewares=authentik@docker + networks: + - web + +networks: + web: + external: true +volumes: + calibre-web-rpg_data: + calibre-web-sff_data: + calibre-web-ace_data: + calibre-web-dev_data: diff --git a/server/config/cloudflare-ddns/docker-compose.yml b/server/config/cloudflare-ddns/docker-compose.yml new file mode 100644 index 0000000..6034f87 --- /dev/null +++ b/server/config/cloudflare-ddns/docker-compose.yml @@ -0,0 +1,12 @@ +version: "3" +services: + cloudflare-ddns: + image: oznu/cloudflare-ddns + container_name: cloudflare-ddns + restart: unless-stopped + environment: + - API_KEY=6wjPH5DND2dFjWIuNTq_TVL-VJS9czp5Wlq3_4ju + - ZONE=jafner.net + - SUBDOMAIN=* + labels: + - traefik.enable=false diff --git a/server/config/drawio/.env b/server/config/drawio/.env new file mode 100644 index 0000000..ae26944 --- /dev/null +++ b/server/config/drawio/.env @@ -0,0 +1 @@ +DRAWIO_BASE_URL=https://draw.jafner.net diff --git a/server/config/drawio/docker-compose.yml b/server/config/drawio/docker-compose.yml new file mode 100644 index 0000000..e692377 --- /dev/null +++ b/server/config/drawio/docker-compose.yml @@ -0,0 +1,74 @@ +version: '3' +services: + plantuml-server: + image: jgraph/plantuml-server + container_name: drawio_plantuml-server + restart: unless-stopped + expose: + - "8080" + networks: + - drawionet + volumes: + - fonts_volume:/usr/share/fonts/drawio + image-export: + image: jgraph/export-server + container_name: drawio_export-server + restart: unless-stopped + expose: + - "8000" + networks: + - drawionet + volumes: + - fonts_volume:/usr/share/fonts/drawio + environment: + - DRAWIO_SERVER_URL=${DRAWIO_BASE_URL} + drawio: + image: jgraph/drawio + container_name: drawio_drawio + links: + - plantuml-server:plantuml-server + - image-export:image-export + depends_on: + - plantuml-server + - image-export + networks: + - drawionet + - web + environment: + - DRAWIO_SELF_CONTAINED=1 + - PLANTUML_URL=http://plantuml-server:8080/ + - EXPORT_URL=http://image-export:8000/ + - DRAWIO_BASE_URL=${DRAWIO_BASE_URL} + - DRAWIO_CSP_HEADER=${DRAWIO_CSP_HEADER} + - DRAWIO_VIEWER_URL=${DRAWIO_VIEWER_URL} + - DRAWIO_CONFIG=${DRAWIO_CONFIG} + - DRAWIO_GOOGLE_CLIENT_ID=${DRAWIO_GOOGLE_CLIENT_ID} + - DRAWIO_GOOGLE_APP_ID=${DRAWIO_GOOGLE_APP_ID} + - DRAWIO_GOOGLE_CLIENT_SECRET=${DRAWIO_GOOGLE_CLIENT_SECRET} + - DRAWIO_GOOGLE_VIEWER_CLIENT_ID=${DRAWIO_GOOGLE_VIEWER_CLIENT_ID} + - DRAWIO_GOOGLE_VIEWER_APP_ID=${DRAWIO_GOOGLE_VIEWER_APP_ID} + - DRAWIO_GOOGLE_VIEWER_CLIENT_SECRET=${DRAWIO_GOOGLE_VIEWER_CLIENT_SECRET} + - DRAWIO_MSGRAPH_CLIENT_ID=${DRAWIO_MSGRAPH_CLIENT_ID} + - DRAWIO_MSGRAPH_CLIENT_SECRET=${DRAWIO_MSGRAPH_CLIENT_SECRET} + - DRAWIO_GITLAB_ID=${DRAWIO_GITLAB_ID} + - DRAWIO_GITLAB_URL=${DRAWIO_GITLAB_URL} + - DRAWIO_CLOUD_CONVERT_APIKEY=${DRAWIO_CLOUD_CONVERT_APIKEY} + - DRAWIO_CACHE_DOMAIN=${DRAWIO_CACHE_DOMAIN} + - DRAWIO_MEMCACHED_ENDPOINT=${DRAWIO_MEMCACHED_ENDPOINT} + - DRAWIO_PUSHER_MODE=2 + - DRAWIO_IOT_ENDPOINT=${DRAWIO_IOT_ENDPOINT} + - DRAWIO_IOT_CERT_PEM=${DRAWIO_IOT_CERT_PEM} + - DRAWIO_IOT_PRIVATE_KEY=${DRAWIO_IOT_PRIVATE_KEY} + - DRAWIO_IOT_ROOT_CA=${DRAWIO_IOT_ROOT_CA} + - DRAWIO_MXPUSHER_ENDPOINT=${DRAWIO_MXPUSHER_ENDPOINT} + labels: + - traefik.http.routers.drawio.rule=Host(`draw.jafner.net`) + - traefik.http.routers.drawio.tls.certresolver=lets-encrypt + +networks: + drawionet: + web: + external: true + +volumes: + fonts_volume: diff --git a/server/config/exatorrent/.env b/server/config/exatorrent/.env new file mode 100644 index 0000000..59582d9 --- /dev/null +++ b/server/config/exatorrent/.env @@ -0,0 +1,2 @@ +DOCKER_DATA=/home/joey/docker_data/exatorrent +TORRENT_DATA=/mnt/torrenting/PUB diff --git a/server/config/exatorrent/docker-compose.yml b/server/config/exatorrent/docker-compose.yml new file mode 100644 index 0000000..cfba1c6 --- /dev/null +++ b/server/config/exatorrent/docker-compose.yml @@ -0,0 +1,25 @@ +version: '3.2' +services: + exatorrent: + build: ./exatorrent # cloned from git@github.com:Jafner/exatorrent.git + #image: ghcr.io/varbhat/exatorrent:latest + container_name: exatorrent + ports: + - 5000:5000 + - 42069:42069 + volumes: + - ${TORRENT_DATA}/torrents:/exa/exadir/torrents + - ${DOCKER_DATA}/data:/exa/exadir/data + - ${DOCKER_DATA}/config:/exa/exadir/config + - ${DOCKER_DATA}/cache:/exa/exadir/cache + networks: + - web + labels: + - traefik.http.routers.exatorrent.rule=Host(`exa.jafner.net`) + - traefik.http.routers.exatorrent.tls.certresolver=lets-encrypt + - traefik.http.routers.exatorrent.middlewares=lan-only@file + - traefik.http.services.exatorrent.loadbalancer.server.port=5000 + +networks: + web: + external: true \ No newline at end of file diff --git a/server/config/exatorrent/exatorrent b/server/config/exatorrent/exatorrent new file mode 160000 index 0000000..ce40b04 --- /dev/null +++ b/server/config/exatorrent/exatorrent @@ -0,0 +1 @@ +Subproject commit ce40b049a6d2deaad0ef0f1725bb481ef43d7bf6 diff --git a/server/config/git_update.sh b/server/config/git_update.sh new file mode 100644 index 0000000..d2cb3a1 --- /dev/null +++ b/server/config/git_update.sh @@ -0,0 +1,5 @@ +#!/bin/bash +cd /home/joey/docker_config/ +git add --all +git commit -am "$(date)" +git push diff --git a/server/config/gitea/.env b/server/config/gitea/.env new file mode 100644 index 0000000..0597099 --- /dev/null +++ b/server/config/gitea/.env @@ -0,0 +1 @@ +DOCKER_DATA=/home/joey/docker_data/gitea \ No newline at end of file diff --git a/server/config/gitea/app.ini b/server/config/gitea/app.ini new file mode 100644 index 0000000..432ebd0 --- /dev/null +++ b/server/config/gitea/app.ini @@ -0,0 +1,2 @@ +START_SSH_SERVER=true +SSH_PORT=2228 \ No newline at end of file diff --git a/server/config/gitea/docker-compose.yml b/server/config/gitea/docker-compose.yml new file mode 100644 index 0000000..80639b5 --- /dev/null +++ b/server/config/gitea/docker-compose.yml @@ -0,0 +1,27 @@ +version: "3" + +networks: + web: + external: true + +services: + server: + image: gitea/gitea:1.15.10 + container_name: gitea + environment: + - USER_UID=9988 + - USER_GID=9988 + restart: always + networks: + - web + volumes: + - ${DOCKER_DATA}:/data + - ./app.ini:/data/gitea/app.ini + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - "2228:22" + labels: + - traefik.http.routers.gitea.rule=Host(`gitea.jafner.net`) + - traefik.http.routers.gitea.tls.certresolver=lets-encrypt + - traefik.http.services.gitea.loadbalancer.server.port=3000 \ No newline at end of file diff --git a/server/config/gitlab/.env b/server/config/gitlab/.env new file mode 100644 index 0000000..e2939f5 --- /dev/null +++ b/server/config/gitlab/.env @@ -0,0 +1,2 @@ +DOCKER_DATA=/home/joey/docker_data/gitlab +DOCKER_CONFIG=/home/joey/docker_config/gitlab \ No newline at end of file diff --git a/server/config/gitlab/docker-compose.yml b/server/config/gitlab/docker-compose.yml new file mode 100644 index 0000000..d81bfd1 --- /dev/null +++ b/server/config/gitlab/docker-compose.yml @@ -0,0 +1,34 @@ +version: '3.3' +services: + gitlab: + image: 'gitlab/gitlab-ee:latest' + container_name: gitlab + restart: unless-stopped + hostname: 'gitlab.jafner.net' + networks: + - web + environment: + GITLAB_OMNIBUS_CONFIG: | + external_url 'https://gitlab.jafner.net' + gitlab_rails['gitlab_shell_ssh_port'] = 2229 + nginx['listen_https'] = false + nginx['listen_port'] = 80 + # Add any other gitlab.rb configuration here, each on its own line + ports: + #- '80:80' + #- '443:443' + - '2229:22' + volumes: + - '${DOCKER_CONFIG}/config:/etc/gitlab' + - '${DOCKER_DATA}/logs:/var/log/gitlab' + - '${DOCKER_DATA}/data:/var/opt/gitlab' + shm_size: '256m' + labels: + - traefik.http.routers.gitlab.rule=Host(`gitlab.jafner.net`) + - traefik.http.routers.gitlab.tls.certresolver=lets-encrypt + - traefik.http.routers.gitlab.middlewares=lan-only@file + - traefik.http.services.gitlab.loadbalancer.server.port=80 + +networks: + web: + external: true \ No newline at end of file diff --git a/server/config/grafana-stack/.env b/server/config/grafana-stack/.env new file mode 100644 index 0000000..e0f4321 --- /dev/null +++ b/server/config/grafana-stack/.env @@ -0,0 +1,2 @@ +DOCKER_DATA=/home/joey/docker_data/grafana-stack +MINECRAFT_DIR=/home/joey/docker_data/minecraft diff --git a/server/config/grafana-stack/.forgetps.json b/server/config/grafana-stack/.forgetps.json new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/server/config/grafana-stack/.forgetps.json @@ -0,0 +1 @@ +[] diff --git a/server/config/grafana-stack/docker-compose.yml b/server/config/grafana-stack/docker-compose.yml new file mode 100644 index 0000000..97e8764 --- /dev/null +++ b/server/config/grafana-stack/docker-compose.yml @@ -0,0 +1,65 @@ +version: '3' +services: + influxdb: + image: influxdb:2.0 + container_name: influxdb + restart: unless-stopped + networks: + - monitoring + ports: + - 8086:8086 + - 8089:8089/udp + volumes: + - ./influxdb.conf:/etc/influxdb/influxdb.conf:ro + - "${DOCKER_DATA}/influxdb:/var/lib/influxdb" + environment: + - TZ=America/Los_Angeles + - DOCKER_INFLUXDB_INIT_MODE=setup + - DOCKER_INFLUXDB_INIT_USERNAME=jafner + - DOCKER_INFLUXDB_INIT_PASSWORD=CX3UuhnNeTWy7GaD7MNsykWww76uJNuN + - "DOCKER_INFLUXDB_INIT_ORG=Jafner Industries" + - DOCKER_INFLUXDB_INIT_BUCKET=Bucket + - DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=35YMePC79Zz2ovM35xFtTi7odFMSrZsf + + telegraf: + image: telegraf:latest + container_name: telegraf + restart: unless-stopped + depends_on: + - influxdb + networks: + - monitoring + volumes: + - ./telegraf.conf:/etc/telegraf/telegraf.conf:ro + - ./scripts/.forgetps.json:/.forgetps.json:ro + - /sys:/rootfs/sys:ro + - /proc:/rootfs/proc:ro + - /etc:/rootfs/etc:ro + + grafana: + image: mbarmem/grafana-render:latest + container_name: grafana + restart: unless-stopped + depends_on: + - influxdb + - telegraf + networks: + - monitoring + - web + user: "0" + volumes: + - ${DOCKER_DATA}/grafana:/var/lib/grafana + - ./grafana.ini:/etc/grafana/grafana.ini + environment: + - GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource,grafana-worldmap-panel,grafana-piechart-panel + labels: + - traefik.http.routers.grafana.rule=Host(`grafana.jafner.net`) + - traefik.http.routers.grafana.tls.certresolver=lets-encrypt + #- traefik.http.routers.grafana.middlewares=authelia@file + +networks: + monitoring: + external: true + web: + external: true + diff --git a/server/config/grafana-stack/grafana.ini b/server/config/grafana-stack/grafana.ini new file mode 100644 index 0000000..63cb3f2 --- /dev/null +++ b/server/config/grafana-stack/grafana.ini @@ -0,0 +1,622 @@ +##################### Grafana Configuration Example ##################### +# +# Everything has defaults so you only need to uncomment things you want to +# change + +# possible values : production, development +;app_mode = production + +# instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty +;instance_name = ${HOSTNAME} + +#################################### Paths #################################### +[paths] +# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used) +;data = /var/lib/grafana + +# Temporary files in `data` directory older than given duration will be removed +;temp_data_lifetime = 24h + +# Directory where grafana can store logs +;logs = /var/log/grafana + +# Directory where grafana will automatically scan and look for plugins +;plugins = /var/lib/grafana/plugins + +# folder that contains provisioning config files that grafana will apply on startup and while running. +;provisioning = conf/provisioning + +#################################### Server #################################### +[server] +# Protocol (http, https, h2, socket) +;protocol = http + +# The ip address to bind to, empty will bind to all interfaces +;http_addr = + +# The http port to use +;http_port = 3000 + +# The public facing domain name used to access grafana from a browser +;domain = localhost + +# Redirect to correct domain if host header does not match domain +# Prevents DNS rebinding attacks +;enforce_domain = false + +# The full public facing url you use in browser, used for redirects and emails +# If you use reverse proxy and sub path specify full url (with sub path) +;root_url = http://localhost:3000 + +# Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons. +;serve_from_sub_path = false + +# Log web requests +;router_logging = false + +# the path relative working path +;static_root_path = public + +# enable gzip +;enable_gzip = false + +# https certs & key file +;cert_file = +;cert_key = + +# Unix socket path +;socket = + +#################################### Database #################################### +[database] +# You can configure the database connection by specifying type, host, name, user and password +# as separate properties or as on string using the url properties. + +# Either "mysql", "postgres" or "sqlite3", it's your choice +;type = sqlite3 +;host = 127.0.0.1:3306 +;name = grafana +;user = root +# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;""" +;password = + +# Use either URL or the previous fields to configure the database +# Example: mysql://user:secret@host:port/database +;url = + +# For "postgres" only, either "disable", "require" or "verify-full" +;ssl_mode = disable + +# For "sqlite3" only, path relative to data_path setting +;path = grafana.db + +# Max idle conn setting default is 2 +;max_idle_conn = 2 + +# Max conn setting default is 0 (mean not set) +;max_open_conn = + +# Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours) +;conn_max_lifetime = 14400 + +# Set to true to log the sql calls and execution times. +;log_queries = + +# For "sqlite3" only. cache mode setting used for connecting to the database. (private, shared) +;cache_mode = private + +#################################### Cache server ############################# +[remote_cache] +# Either "redis", "memcached" or "database" default is "database" +;type = database + +# cache connectionstring options +# database: will use Grafana primary database. +# redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=0,ssl=false`. Only addr is required. ssl may be 'true', 'false', or 'insecure'. +# memcache: 127.0.0.1:11211 +;connstr = + +#################################### Data proxy ########################### +[dataproxy] + +# This enables data proxy logging, default is false +;logging = false + +# How long the data proxy should wait before timing out default is 30 (seconds) +;timeout = 30 + +# If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request, default is false. +;send_user_header = false + +#################################### Analytics #################################### +[analytics] +# Server reporting, sends usage counters to stats.grafana.org every 24 hours. +# No ip addresses are being tracked, only simple counters to track +# running instances, dashboard and error counts. It is very helpful to us. +# Change this option to false to disable reporting. +;reporting_enabled = true + +# Set to false to disable all checks to https://grafana.net +# for new vesions (grafana itself and plugins), check is used +# in some UI views to notify that grafana or plugin update exists +# This option does not cause any auto updates, nor send any information +# only a GET request to http://grafana.com to get latest versions +;check_for_updates = true + +# Google Analytics universal tracking code, only enabled if you specify an id here +;google_analytics_ua_id = + +# Google Tag Manager ID, only enabled if you specify an id here +;google_tag_manager_id = + +#################################### Security #################################### +[security] +# default admin user, created on startup +;admin_user = admin +admin_user = jafner + +# default admin password, can be changed before first start of grafana, or in profile settings +;admin_password = admin +admin_password = joeyyeoj + +# used for signing +;secret_key = SW2YcwTIb9zpOOhoPsMm + +# disable gravatar profile images +;disable_gravatar = false + +# data source proxy whitelist (ip_or_domain:port separated by spaces) +;data_source_proxy_whitelist = + +# disable protection against brute force login attempts +;disable_brute_force_login_protection = false + +# set to true if you host Grafana behind HTTPS. default is false. +;cookie_secure = false + +# set cookie SameSite attribute. defaults to `lax`. can be set to "lax", "strict" and "none" +;cookie_samesite = lax + +# set to true if you want to allow browsers to render Grafana in a ,