From 64c0d82d484d6110260b71706cb747e7fbd15808 Mon Sep 17 00:00:00 2001
From: Dennis Postma <dennis@directonline.io>
Date: Sat, 8 Feb 2025 23:01:48 +0100
Subject: [PATCH] Reverted to working state of docker compose

---
 .env.example       |  7 ++++-
 docker-compose.yml | 25 +---------------
 traefik.yml        | 74 ----------------------------------------------
 3 files changed, 7 insertions(+), 99 deletions(-)
 delete mode 100644 traefik.yml

diff --git a/.env.example b/.env.example
index b71e628..274b602 100644
--- a/.env.example
+++ b/.env.example
@@ -25,4 +25,9 @@ DEFAULT_CHARACTER_POS_Y="0"
 SMTP_HOST=my.directonline.io
 SMTP_PORT=587
 SMTP_USER=no-reply@noxious.gg
-SMTP_PASSWORD=""
\ No newline at end of file
+SMTP_PASSWORD=""
+
+# Traefik configuration
+ACME_EMAIL=info@noxious.gg
+TRAEFIK_DASHBOARD_HOST=traefik.server.noxious.gg
+TRAEFIK_BASIC_AUTH=admin:$apr1$42pa8hen$p.bKJ3.gHJ9U0ZwyVxmIc0
\ No newline at end of file
diff --git a/docker-compose.yml b/docker-compose.yml
index 5b8de86..1c9c75c 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -34,28 +34,6 @@ services:
     restart: unless-stopped
     networks:
       - app-network
-    labels:
-      - "traefik.enable=true"
-      - "traefik.http.routers.app.rule=Host(`${HOST}`)"
-      - "traefik.http.routers.app.entrypoints=websecure"
-      - "traefik.http.routers.app.tls.certresolver=le"
-      - "traefik.http.services.app.loadbalancer.server.port=${PORT}"
-      - "traefik.http.routers.app.middlewares=websocket"
-
-  traefik:
-    image: traefik:v3.3.3
-    ports:
-      - "80:80"
-      - "443:443"
-      - "8080:8080"
-    volumes:
-      - traefik_data:/data
-      - ./traefik.yml:/traefik.yml
-      - /var/run/docker.sock:/var/run/docker.sock:ro
-    restart: unless-stopped
-    networks:
-      - app-network
-    command: --configFile=/traefik.yml
 
   mariadb:
     image: mariadb:lts
@@ -92,5 +70,4 @@ volumes:
   app-public:
   app-logs:
   mariadb-data:
-  redis-data:
-  traefik_data:
\ No newline at end of file
+  redis-data:
\ No newline at end of file
diff --git a/traefik.yml b/traefik.yml
deleted file mode 100644
index b9553bc..0000000
--- a/traefik.yml
+++ /dev/null
@@ -1,74 +0,0 @@
-entryPoints:
-  web:
-    address: ":80"
-    http:
-      redirections:
-        entryPoint:
-          to: "websecure"
-          scheme: "https"
-  websecure:
-    address: ":443"
-
-providers:
-  docker:
-    endpoint: "unix:///var/run/docker.sock"
-    exposedByDefault: false
-
-certificatesResolvers:
-  le:
-    acme:
-      email: "your-email@example.com"
-      storage: "/data/acme.json"
-      tlsChallenge: {}
-
-api:
-  dashboard: true
-
-ping:
-  entryPoint: "websecure"
-
-http:
-  routers:
-    api:
-      rule: "PathPrefix(`/api`)"
-      service: "api"
-      entryPoints: ["websecure"]
-    app:
-      rule: "Host(`${HOST}`)"
-      entryPoints: ["websecure"]
-      service: "app"
-      tls:
-        certResolver: "le"
-      middlewares:
-        - "websocket"
-
-  services:
-    api:
-      loadBalancer:
-        servers:
-          - url: "http://app:${PORT}"
-    app:
-      loadBalancer:
-        sticky: true
-        servers:
-          - url: "http://app:${PORT}"
-
-  middlewares:
-    websocket:
-      headers:
-        accessControlAllowHeaders:
-          - "Origin"
-          - "Content-Type"
-          - "Accept"
-          - "Authorization"
-        accessControlAllowMethods:
-          - "GET"
-          - "POST"
-          - "PUT"
-          - "DELETE"
-          - "PATCH"
-          - "OPTIONS"
-        accessControlAllowOrigin: ["*"]
-        accessControlExposeHeaders:
-          - "Content-Length"
-          - "Content-Range"
\ No newline at end of file