docker-compose resource definitions for web servers

This commit is contained in:
2025-12-28 22:48:01 +01:00
parent 80b58a9f3e
commit 7b42f2e3bd
5 changed files with 221 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
version: '3'
services:
whoami:
image: traefik/whoami
container_name: whoami
restart: unless-stopped
# NETWORK
networks:
- traefik
# TRAEFIK LABELS
labels:
# Enable Traefik for this container
- "traefik.enable=true"
# Router definition
- "traefik.http.routers.whoami.rule=Host(`whoami.example.com`)"
- "traefik.http.routers.whoami.entrypoints=web"
# Service definition
- "traefik.http.services.whoami.loadbalancer.server.port=80"
# NETWORK DEFINITIONS
networks:
traefik:
external: true