Files
kolaytercih/docker-compose.yml
bilalgursen 0ab4dbe88c
All checks were successful
Deploy / deploy (push) Successful in 7m18s
Enhance Traefik configuration for www.kolaytercih.com
Added a new router and middleware for handling www to apex domain redirection, ensuring that Let's Encrypt certificates are obtained for both domains. Updated the docker-compose.yml file to include necessary rules and middleware for proper redirection and TLS handling.

Also, updated the CEO agent description to remove redundant details and clarified the QA engineer's responsibilities regarding testing critical flows and error reporting. Adjusted the CTO agent's section for consistency in expert guidance and clarified the designer's tools to include 'Skill' for better design resource management.
2026-09-21 20:37:12 +03:00

43 lines
1.7 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
services:
app:
build: .
container_name: kolaytercih
restart: unless-stopped
# Host'u korur: uygulama bu sınırın üstüne çıkamaz. OOM anında kernel'ın
# önce build süreçlerini (skor 0) öldürmesi için negatif oom_score_adj.
mem_limit: 1g
mem_reservation: 256m
oom_score_adj: -600
volumes:
- app-data:/app/data
env_file:
- .env.production
environment:
- APP_DB_URL=file:/app/data/app.db
networks:
- traefik
labels:
- traefik.enable=true
- traefik.docker.network=traefik
- traefik.http.routers.kolaytercih.rule=Host(`kolaytercih.com`)
- traefik.http.routers.kolaytercih.entrypoints=websecure
- traefik.http.routers.kolaytercih.tls.certresolver=letsencrypt
- traefik.http.services.kolaytercih.loadbalancer.server.port=3000
# www → apex kalıcı yönlendirme. Ayrı router olduğu için Let's Encrypt
# sertifikası www adı için de alınır; bunun için www'nin DNS kaydı bu
# etiketler deploy edilmeden ÖNCE var olmalı. ($$: compose'ta $ kaçışı.)
- traefik.http.routers.kolaytercih-www.rule=Host(`www.kolaytercih.com`)
- traefik.http.routers.kolaytercih-www.entrypoints=websecure
- traefik.http.routers.kolaytercih-www.tls.certresolver=letsencrypt
- traefik.http.routers.kolaytercih-www.middlewares=kolaytercih-www-yonlendir
- traefik.http.middlewares.kolaytercih-www-yonlendir.redirectregex.regex=^https?://www\.kolaytercih\.com/(.*)
- traefik.http.middlewares.kolaytercih-www-yonlendir.redirectregex.replacement=https://kolaytercih.com/$${1}
- traefik.http.middlewares.kolaytercih-www-yonlendir.redirectregex.permanent=true
networks:
traefik:
external: true
volumes:
app-data: