spomeni/docker-compose.yaml
dimitar 08ea4d35b2
Some checks are pending
CI / build (push) Waiting to run
another traefic conf
2026-08-04 08:36:24 +02:00

48 lines
1.8 KiB
YAML

services:
app:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
env_file:
- .env
networks:
- coolify
labels:
traefik.enable: "true"
traefik.docker.network: "coolify"
Root domain: testbed.mk
traefik.http.routers.testbed-root.rule: "Host(`testbed.mk`)"
traefik.http.routers.testbed-root.entryPoints: "https"
traefik.http.routers.testbed-root.service: "spomeniqr-svc"
traefik.http.routers.testbed-root.tls: "true"
# Wildard subdomains: *.testbed.mk
traefik.http.routers.testbed-wildcard.rule: "HostRegexp(`{subdomain:[a-zA-Z0-9-]+}.testbed.mk`)"
traefik.http.routers.testbed-wildcard.entryPoints: "https"
traefik.http.routers.testbed-wildcard.service: "spomeniqr-svc"
traefik.http.routers.testbed-wildcard.tls: "true"
# HTTP→ HTTPS redirect for root
traefik.http.routers.testbed-root-http.rule: "Host(`testbed.mk`)"
traefik.http.routers.testbed-root-http.entryPoints: "http"
traefik.http.routers.testbed-root-http.middlewares: "redirect-to-https"
traefik.http.routers.testbed-root-http.service: "spomeniqr-svc"
# HTTP→ HTTPS redirect for wildcard
traefik.http.routers.testbed-wildcard-http.rule: "HostRegexp(`{subdomain:[a-zA-Z0-9-]+}.testbed.mk`)"
traefik.http.routers.testbed-wildcard-http.entryPoints: "http"
traefik.http.routers.testbed-wildcard-http.middlewares: "redirect-to-https"
traefik.http.routers.testbed-wildcard-http.service: "spomeniqr-svc"
# Services
traefik.http.services.spomeniqr-svc.loadbalancer.server.url:"http://app:3000"
# Gzipcompression
traefik.http.middlewares.gzip.compress: "true"
traefik.http.middlewares.redirect-to-https.redirectscheme.scheme: "https"
networks:
coolify:
external: true