Compare commits

5 Commits

Author SHA1 Message Date
compute 2ffbd08f84 Add restart policy 2026-05-07 17:12:43 +00:00
compute bea83f5b03 Add anki synserver 2026-05-03 11:58:48 +00:00
compute 5c4367cf7b Use watchtowerrr fork 2026-05-03 11:57:37 +00:00
compute 9043105edb Merge branch 'master' of https://gitea.sporada.eu/sporada/selfhosted-traefik 2026-05-03 07:42:29 +00:00
compute 69d5fc0b16 Add missing services and update -gitignore 2026-05-03 07:40:52 +00:00
11 changed files with 221 additions and 1 deletions
+14
View File
@@ -7,12 +7,26 @@ loolwsd.xml
# Service folders # Service folders
**/bundesdata_web_app/ **/bundesdata_web_app/
**/data/ **/data/
**/data*/
**/db/ **/db/
**/mariadb/ **/mariadb/
**/redis/ **/redis/
**/html/ **/html/
**/volumes/ **/volumes/
**/config/ **/config/
**/config*/
**/ollama/
# Game Servers
## Sons Of The Forest
**/game/
## V Rising
**/persistent-data/
**/server-data/
# tar files # tar files
*.tar *.tar
# SFTP for moving mod files
**/sftp/
+40
View File
@@ -0,0 +1,40 @@
FROM rust:1.85.0-alpine3.20 AS builder
ARG ANKI_VERSION
RUN apk update && apk add --no-cache build-base protobuf && rm -rf /var/cache/apk/*
RUN cargo install --git https://github.com/ankitects/anki.git \
--tag ${ANKI_VERSION} \
--root /anki-server \
--locked \
anki-sync-server
FROM alpine:3.21.0
# Default PUID and PGID values (can be overridden at runtime). Use these to
# ensure the files on the volume have the permissions you need.
ENV PUID=1000
ENV PGID=1000
COPY --from=builder /anki-server/bin/anki-sync-server /usr/local/bin/anki-sync-server
RUN apk update && apk add --no-cache bash su-exec && rm -rf /var/cache/apk/*
EXPOSE 8080
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["anki-sync-server"]
# This health check will work for Anki versions 24.08.x and newer.
# For older versions, it may incorrectly report an unhealthy status, which should not be the case.
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD wget -qO- http://127.0.0.1:8080/health || exit 1
VOLUME /anki_data
LABEL maintainer="Jean Khawand <jk@jeankhawand.com>"
+32
View File
@@ -0,0 +1,32 @@
networks:
default:
name: traefik_default
external: true
services:
anki-syncserver:
container_name: anki-syncserver
build:
dockerfile: Dockerfile
args:
- ANKI_VERSION=25.09
env_file: live.env
restart: unless-stopped
ports:
- "8080:8080"
environment:
- SYNC_USER1=${USER_NAME}:${USER_PASSWORD}
volumes:
- ./data:/anki-sync-server-data
labels:
# Watchtower
- "com.centurylinklabs.watchtower.enable=true"
# Routes
- "traefik.enable=true"
- "traefik.http.routers.anki.entrypoints=websecure"
- "traefik.http.routers.anki.rule=Host(`anki.${DOMAIN}`)"
- "traefik.http.routers.anki.tls=true"
- "traefik.http.routers.anki.tls.certresolver=myresolver"
- "traefik.http.services.anki.loadbalancer.server.port=8080"
networks:
- default
+30
View File
@@ -0,0 +1,30 @@
#!/bin/sh
set -o errexit
set -o nounset
set -o pipefail
# Default PUID and PGID if not provided
export PUID=${PUID:-1000}
export PGID=${PGID:-1000}
# These values are fixed and cannot be overwritten from the outside for
# convenience and safety reasons
export SYNC_PORT=8080
export SYNC_BASE=/anki_data
# Check if group exists, create if not
if ! getent group anki-group > /dev/null 2>&1; then
addgroup -g "$PGID" anki-group
fi
# Check if user exists, create if not
if ! id -u anki > /dev/null 2>&1; then
adduser -D -H -u "$PUID" -G anki-group anki
fi
# Fix ownership of mounted volumes
mkdir -p /anki_data
chown anki:anki-group /anki_data
# Run the provided command as the `anki` user
exec su-exec anki "$@"
+7
View File
@@ -0,0 +1,7 @@
# Anki Syncserver
ANKI_VERSION=25.09
USER_NAME=admin
USER_PASSWORD=password
# Traefik
DOMAIN=sporada.eu
+3
View File
@@ -0,0 +1,3 @@
# must be ended with a new line "LF" (Unix) and not "CRLF" (Windows)
@hourly occ preview:pre-generate
# An empty line is required at the end of this file for a valid cron file.
+54
View File
@@ -0,0 +1,54 @@
networks:
default:
name: traefik_default
external: true
services:
ollama:
container_name: ollama
restart: unless-stopped
image: ollama/ollama:latest
labels:
# Watchtower
- "com.centurylinklabs.watchtower.enable=true"
# Traefik
# - "traefik.enable=true"
# - "traefik.http.routers.ollama.rule=Host(`ollama.${DOMAIN}`)"
# - "traefik.http.routers.ollama.entrypoints=websecure"
# - "traefik.http.routers.ollama.tls.certresolver=myresolver"
# - "traefik.http.routers.ollama.tls=true"
# - "traefik.http.services.ollama.loadbalancer.server.port=11434"
# Basic auth
# - "traefik.http.middlewares.test-auth.basicauth.users=${OLLAMA_USER}:${OLLAMA_PASSWORD_HASH}"
networks:
- default
volumes:
- "./ollama/ollama:/root/.ollama"
ollama-webui:
image: ghcr.io/open-webui/open-webui:main
container_name: ollama-webui
volumes:
- ./ollama/ollama-webui:/app/backend/data
depends_on:
- ollama
environment:
- OLLAMA_BASE_URLS=http://ollama:11434
- ENV=prod
- WEBUI_AUTH=True
- ENABLE_LOGIN_FORM=True
- WEBUI_NAME=${WEBUI_NAME}
- WEBUI_URL=https://chat.${DOMAIN}
- WEBUI_SECRET_KEY=${SECRET}
extra_hosts:
- host.docker.internal:host-gateway
restart: unless-stopped
networks:
- default
labels:
- "traefik.enable=true"
- "traefik.http.routers.chat.rule=Host(`chat.${DOMAIN}`)"
- "traefik.http.routers.chat.entrypoints=websecure"
- "traefik.http.routers.chat.tls.certresolver=myresolver"
- "traefik.http.services.chat.loadbalancer.server.port=8080"
+2
View File
@@ -0,0 +1,2 @@
# Traefik
DOMAIN=domain.com
+16
View File
@@ -0,0 +1,16 @@
services:
sons-of-the-forest-dedicated-server:
container_name: sons-of-the-forest-dedicated-server
image: jammsen/sons-of-the-forest-dedicated-server:latest
restart: always
environment:
PUID: 1000
PGID: 1000
ALWAYS_UPDATE_ON_START: true
SKIP_NETWORK_ACCESSIBILITY_TEST: true
ports:
- 8766:8766/udp
- 27016:27016/udp
- 9700:9700/udp
volumes:
- ./game:/sonsoftheforest
+1 -1
View File
@@ -75,7 +75,7 @@ services:
WATCHTOWER_NO_STARTUP_MESSAGE: "false" WATCHTOWER_NO_STARTUP_MESSAGE: "false"
WATCHTOWER_SCHEDULE: "0 30 12 * * *" # Everyday at 12:30 WATCHTOWER_SCHEDULE: "0 30 12 * * *" # Everyday at 12:30
DOCKER_HOST: tcp://socket-proxy:2375 DOCKER_HOST: tcp://socket-proxy:2375
image: containrrr/watchtower:latest image: nickfedor/watchtower:latest
labels: labels:
- "com.centurylinklabs.watchtower.enable=true" - "com.centurylinklabs.watchtower.enable=true"
networks: networks:
+22
View File
@@ -0,0 +1,22 @@
services:
vrising:
image: trueosiris/vrising
environment:
- TZ=Europe/Paris
- SERVERNAME=vrising-TrueOsiris
volumes:
- type: bind
source: ./server-data
target: /mnt/vrising/server
bind:
create_host_path: true
- type: bind
source: ./persistent-data
target: /mnt/vrising/persistentdata
bind:
create_host_path: true
ports:
- '9876:9876/udp'
- '9877:9877/udp'
restart: unless-stopped
network_mode: bridge