diff --git a/compose.yaml b/compose.yaml index 1c21eba..be100b4 100644 --- a/compose.yaml +++ b/compose.yaml @@ -15,7 +15,7 @@ services: - flaskpaste-data:/app/data environment: - FLASK_ENV=production - - FLASKPASTE_URL_PREFIX=/paste # HAProxy strips this before forwarding + - FLASKPASTE_URL_PREFIX= # No prefix - served at root - FLASKPASTE_EXPIRY=432000 # 5 days - FLASKPASTE_MAX_ANON=3145728 # 3 MiB - FLASKPASTE_MAX_AUTH=52428800 # 50 MiB diff --git a/kubernetes.yaml b/kubernetes.yaml index f9f4668..2205531 100644 --- a/kubernetes.yaml +++ b/kubernetes.yaml @@ -16,7 +16,7 @@ metadata: namespace: flaskpaste data: FLASK_ENV: "production" - FLASKPASTE_URL_PREFIX: "/paste" + FLASKPASTE_URL_PREFIX: "" FLASKPASTE_EXPIRY_ANON: "432000" FLASKPASTE_MAX_ANON: "3145728" FLASKPASTE_MAX_AUTH: "52428800" @@ -110,24 +110,22 @@ spec: nodePort: 30500 type: NodePort --- -# Optional: Ingress for external access -# Uncomment and adjust for your ingress controller -# apiVersion: networking.k8s.io/v1 -# kind: Ingress -# metadata: -# name: flaskpaste -# namespace: flaskpaste -# annotations: -# nginx.ingress.kubernetes.io/proxy-body-size: "50m" -# spec: -# rules: -# - host: paste.example.com -# http: -# paths: -# - path: / -# pathType: Prefix -# backend: -# service: -# name: flaskpaste -# port: -# number: 80 +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: flaskpaste + namespace: flaskpaste + annotations: + traefik.ingress.kubernetes.io/router.middlewares: "" +spec: + rules: + - host: paste.mymx.me + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: flaskpaste + port: + number: 80