From 644c701b1df4f1e509ee9e6a2603975ccb8f38df Mon Sep 17 00:00:00 2001 From: Klagarge Date: Tue, 6 Feb 2024 09:42:50 +0100 Subject: [PATCH] Initial commit --- .env.template | 0 docker-compose.yml | 71 ++++++++++++++++++++++++++++++++++++++++++++++ traefik.yml | 21 ++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 .env.template create mode 100644 docker-compose.yml create mode 100644 traefik.yml diff --git a/.env.template b/.env.template new file mode 100644 index 0000000..e69de29 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..92d6d7a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,71 @@ +version: '3' + +services: + + traefik: + image: traefik:v2.9 + restart: unless-stopped + ports: + # Read this on how to open ports + # https://github.com/chaifeng/ufw-docker + - "80:80" + - "443:443" + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - ./traefik.yml:/etc/traefik/traefik.yml + - ./authorized_users:/etc/traefik/authorized_users + - ./acme.json:/acme.json + labels: + - "traefik.enable=true" + - "traefik.http.routers.dashboard-http.entrypoints=http" + - "traefik.http.routers.dashboard-http.rule=Host(`server.ava.kb28.ch`,`server.ava.jcloud.ik-server.com`)" + - "traefik.http.routers.dashboard-http.middlewares=dashboard-redirect" + - "traefik.http.middlewares.dashboard-redirect.redirectscheme.scheme=https" + - "traefik.http.routers.dashboard-https.entrypoints=https" + - "traefik.http.routers.dashboard-https.rule=(Host(`server.ava.kb28.ch`,`server.ava.jcloud.ik-server.com`)) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))" + - "traefik.http.routers.dashboard-https.tls.certResolver=letsencrypt" + - "traefik.http.routers.dashboard-https.service=api@internal" + - "traefik.http.routers.dashboard-https.middlewares=dashboard-auth" + - "traefik.http.middlewares.dashboard-auth.basicauth.usersfile=/etc/traefik/authorized_users" + + ubuntu-test: + build: ./ubuntu-test + restart: unless-stopped + ports: + - '25057:22' + + ollama: + image: ollama/ollama + restart: unless-stopped + container_name: ollama + ports: + - '11434:11434' + volumes: + - 'ollama:/root/.ollama' + + ollama-webui: + image: 'ghcr.io/ollama-webui/ollama-webui:main' + restart: unless-stopped + container_name: ollama-webui + volumes: + - 'ollama-webui:/app/backend/data' + depends_on: + - ollama + ports: + - 80:8080 + environment: + - '/ollama/api=http://ollama:11434/api' + extra_hosts: + - host.docker.internal:host-gateway + labels: + - "traefik.enable=true" + - "traefik.http.routers.ollama-webui-http.entrypoints=http" + - "traefik.http.routers.ollama-webui-http.rule=Host(`ollama.ava.kb28.ch`,`ollama.ava.jcloud.ik-server.com`)" + - "traefik.http.routers.ollama-webui-http.middlewares=ollama-webui-redirect" + - "traefik.http.middlewares.ollama-webui-redirect.redirectscheme.scheme=https" + - "traefik.http.routers.ollama-webui-https.entrypoints=https" + - "traefik.http.routers.ollama-webui-https.rule=Host(`ollama.ava.kb28.ch`,`ollama.ava.jcloud.ik-server.com`)" + - "traefik.http.routers.ollama-webui-https.tls.certResolver=letsencrypt" + - "traefik.http.routers.ollama-webui-https.service=ollama-webui" + - "traefik.http.routers.ollama-webui-https.middlewares=ollama-webui-auth" + - "traefik.http.middlewares.ollama-webui-auth.basicauth.usersfile=/etc/traefik/authorized_users" diff --git a/traefik.yml b/traefik.yml new file mode 100644 index 0000000..cd45e83 --- /dev/null +++ b/traefik.yml @@ -0,0 +1,21 @@ +providers: + docker: + watch: true + exposedByDefault: false + +entryPoints: + http: + address: ":80" + https: + address: ":443" + +api: + dashboard: true + +certificatesResolvers: + letsencrypt: + acme: + email: info@herdac.ch + storage: acme.json + httpChallenge: + entryPoint: http