Add Traefik labels for reverse proxy routing

- Configure service with Traefik labels for mycofi.earth
- Join traefik-public network for service discovery
- Remove direct port exposure (routing through Traefik now)
- Remove deprecated docker-compose version field

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root 2025-11-27 02:45:54 +01:00
parent ee51ac8baa
commit 0844ae2ead
1 changed files with 8 additions and 6 deletions

View File

@ -1,5 +1,3 @@
version: '3.8'
services:
mycofi-earth-website:
build:
@ -8,18 +6,22 @@ services:
image: mycofi-earth-website:latest
container_name: mycofi-earth-website
restart: unless-stopped
ports:
- "3003:3000" # Expose on port 3003 to avoid conflicts with other services
environment:
- NODE_ENV=production
- HOSTNAME=0.0.0.0
- PORT=3000
networks:
- mycofi-network
- traefik-public
labels:
- "com.docker.compose.project=mycofi-earth"
- "description=MycoFi Earth Website - Next.js Application"
- "traefik.enable=true"
- "traefik.http.routers.mycofi.rule=Host(`mycofi.earth`) || Host(`www.mycofi.earth`)"
- "traefik.http.routers.mycofi.entrypoints=web"
- "traefik.http.services.mycofi.loadbalancer.server.port=3000"
- "traefik.docker.network=traefik-public"
networks:
mycofi-network:
driver: bridge
traefik-public:
external: true