diff --git a/.gitignore b/.gitignore index f171918..cd5e3e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,20 @@ -# Only manually added files +# Only approved files * +#include subdirectories +!*/ +#ignore vscode-server folder, a lot of junk in there +.vscode-server -!.gitignore -!*/compose.yaml \ No newline at end of file +#ignore .gitignore in subdirectories, nextcloud is a mess +!/.gitignore + +#allow compose files and dockerfiles +!compose.yaml +!Dockerfile + +#allow core scripts +!start_everything.sh +!backup.sh + +#unused service +admin-homepage \ No newline at end of file diff --git a/backup.sh b/backup.sh new file mode 100644 index 0000000..3f08f37 --- /dev/null +++ b/backup.sh @@ -0,0 +1,15 @@ +#!/bin/bash +sudo tar -cvpzf /home-backup.tar.gz \ + --exclude='home/debian/jellyfin/jellyfin-media-remote' \ + --exclude='home/debian/jellyfin/media' \ + --exclude='home/debian/jellyfin/media_mount' \ + --exclude='home/debian/jellyfin/media_disk.img' \ + --exclude='home/debian/.dotnet' \ + --exclude='home/debian/.vscode-server' \ + --exclude='*data/appdata_*/preview*' \ + --exclude='home/debian/.docker' \ + --exclude='home/debian/.acme.sh' \ + --exclude='home/debian/palworld/palworld/Pal/Binaries' \ + --exclude='home/debian/palworld/palworld/Engine' \ + --exclude='home/debian/palworld/palworld/Pal/Content' \ + /home/debian diff --git a/docker/synapse/compose.yaml b/docker/synapse/compose.yaml new file mode 100644 index 0000000..f7ee150 --- /dev/null +++ b/docker/synapse/compose.yaml @@ -0,0 +1,52 @@ +services: + postgres: + image: postgres:15-alpine + restart: always + environment: + POSTGRES_USER: ${PSQL_NAME} + POSTGRES_PASSWORD: ${PSQL_PASS} + POSTGRES_DB: ${PSQL_DB_NAME} + POSTGRES_INITDB_ARGS: --encoding=UTF8 --lc-collate=C --lc-ctype=C + PGUSER: ${PSQL_NAME} + PGDATABASE: ${PSQL_DB_NAME} + volumes: + - synapse-pg-data:/var/lib/postgresql/data + networks: + - synapse-net + - postgre-general + logging: + driver: "json-file" + options: + max-size: "50m" + max-file: "3" + + synapse-foxgirls: + image: matrixdotorg/synapse:latest + restart: unless-stopped + environment: + SYNAPSE_SERVER_NAME: foxgirls.date + SYNAPSE_REPORT_STATS: "yes" + SYNAPSE_DATABASE: "postgres://${PSQL_NAME}:${PSQL_PASS}@postgres/${PSQL_DB_NAME}" + volumes: + - ~/synapse-data2:/data # Host folder with config, media, logs + depends_on: + - postgres + networks: + - synapse-net + - reverse_proxy_default + logging: + driver: "json-file" + options: + max-size: "50m" + max-file: "3" + +volumes: + synapse-pg-data: + +networks: + synapse-net: + driver: bridge + reverse_proxy_default: + external: true + postgre-general: + external: true \ No newline at end of file diff --git a/gitea/compose.yaml b/gitea/compose.yaml new file mode 100644 index 0000000..ca80afb --- /dev/null +++ b/gitea/compose.yaml @@ -0,0 +1,44 @@ + +services: + server: + image: docker.gitea.com/gitea:1.27.0 + container_name: gitea + restart: unless-stopped + + environment: + - USER_UID=1000 + - USER_GID=1000 + - GITEA__database__DB_TYPE=${DB_TYPE} + - GITEA__database__HOST=${DB_HOST} + - GITEA__database__NAME=${DB_NAME} + - GITEA__database__USER=${DB_UNAME} + - GITEA__database__PASSWD=${DB_PASS} + + - GITEA__server__ROOT_URL=https://git.foxgirls.date + - GITEA__server__DOMAIN=git.foxgirls.date + + - GITEA__server__SSH_DOMAIN=git.foxgirls.date + - GITEA__server__SSH_PORT=2001 + - GITEA__server__SSH_LISTEN_PORT=22 + + + volumes: + - ./gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + + networks: + - reverse_proxy_default + + logging: + driver: "json-file" + options: + max-size: "50m" + max-file: "3" + + ports: + - "2001:22" + +networks: + reverse_proxy_default: + external: true \ No newline at end of file diff --git a/homepage/Dockerfile b/homepage/Dockerfile new file mode 100644 index 0000000..dc8540b --- /dev/null +++ b/homepage/Dockerfile @@ -0,0 +1,16 @@ +FROM python:3.12-slim + +ENV PYTHONDONTWRITEBYTECODE=1 \ + PYTHONUNBUFFERED=1 + +WORKDIR /app + +RUN pip install --no-cache-dir \ + flask \ + gunicorn + +COPY . . + +EXPOSE 5000 + +CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app_base"] \ No newline at end of file diff --git a/homepage/compose.yaml b/homepage/compose.yaml new file mode 100644 index 0000000..3e1c6c1 --- /dev/null +++ b/homepage/compose.yaml @@ -0,0 +1,18 @@ +services: + homepage: + restart: unless-stopped + container_name: home-page + build: . + volumes: + - ./images:/app/images:ro + - ./templates:/app/templates:ro + networks: + - reverse_proxy_default + logging: + driver: "json-file" + options: + max-size: "50m" + max-file: "3" +networks: + reverse_proxy_default: + external: true \ No newline at end of file diff --git a/palworld/adminPage/Dockerfile b/palworld/adminPage/Dockerfile new file mode 100644 index 0000000..c4c5ea2 --- /dev/null +++ b/palworld/adminPage/Dockerfile @@ -0,0 +1,18 @@ +FROM python:3.12-slim + +ENV PYTHONDONTWRITEBYTECODE=1 \ + PYTHONUNBUFFERED=1 + +WORKDIR /app + +RUN pip install --no-cache-dir \ + flask \ + flask-basicauth \ + docker \ + gunicorn + +COPY . . + +EXPOSE 5000 + +CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app_base"] \ No newline at end of file diff --git a/palworld/compose.yaml b/palworld/compose.yaml new file mode 100644 index 0000000..7db837a --- /dev/null +++ b/palworld/compose.yaml @@ -0,0 +1,75 @@ +services: + palworld: + image: thijsvanloef/palworld-server-docker:latest + restart: unless-stopped + container_name: palworld-server + stop_grace_period: 30s # Set to however long you are willing to wait for the container to gracefully stop + ports: + - 8211:8211/udp + - 27015:27015/udp + expose: + - 8212 #exposed to system, behind firewall + environment: + PUID: 1000 + PGID: 1000 + PORT: 8211 # Optional but recommended + PLAYERS: 16 # Optional but recommended + SERVER_PASSWORD: ${PWD} + MULTITHREADING: true + REST_API_ENABLED: true + REST_API_PORT: 8212 + TZ: "UTC" + ADMIN_PASSWORD: ${ADMIN_PWD} + COMMUNITY: false # Enable this if you want your server to show up in the community servers tab, USE WITH SERVER_PASSWORD! + SERVER_NAME: "Fluffy Cult" + SERVER_DESCRIPTION: "The server that worships the god given flufy tails" + CROSSPLAY_PLATFORMS: "(Steam,Xbox,PS5,Mac)" + RCON_ENABLED: true + RCON_PORT: 25575 + BUILD_OBJECT_DETERIORATION_DAMAGE_RATE: 0.0 + + networks: + - palworld-network + volumes: + - ./palworld:/palworld/ + deploy: + resources: + limits: + memory: 10G + admin-panel: + build: ./adminPage + depends_on: + - admin-backend + container_name: palworld-admin-panel + restart: unless-stopped + networks: + - reverse_proxy_default + - palworld-admin + environment: + - CONTAINER_NAME=palworld-server + - DOCKER_HOST=tcp://admin-backend:2375 + - PASSWORD=saf3fluffypvvd + - USERNAME=admin + + admin-backend: + image: tecnativa/docker-socket-proxy + restart: unless-stopped + networks: + - palworld-admin + environment: + - ALLOW_START=1 + - ALLOW_STOP=1 + - POST=1 + - CONTAINERS=1 + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro +networks: + palworld-admin: + internal: true + reverse_proxy_default: + external: true + palworld-network: + external: true + + + diff --git a/uptime-kuma/compose.yaml b/uptime-kuma/compose.yaml new file mode 100644 index 0000000..c5f3ad7 --- /dev/null +++ b/uptime-kuma/compose.yaml @@ -0,0 +1,30 @@ +services: + kuma: + image: louislam/uptime-kuma:2 + restart: unless-stopped + container_name: uptime-kuma + volumes: + - ./kuma_data:/app/data + networks: + - reverse_proxy_default + - palworld-network + environment: + - TZ=CET + - UMASK=0022 + healthcheck: + test: ["CMD", "node", "extra/healthcheck.js"] + interval: 30s + retries: 3 + start_period: 10s + timeout: 5s + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" + +networks: + reverse_proxy_default: + external: true + palworld-network: + external: true \ No newline at end of file