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:
parent
ee51ac8baa
commit
0844ae2ead
|
|
@ -1,5 +1,3 @@
|
||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mycofi-earth-website:
|
mycofi-earth-website:
|
||||||
build:
|
build:
|
||||||
|
|
@ -8,18 +6,22 @@ services:
|
||||||
image: mycofi-earth-website:latest
|
image: mycofi-earth-website:latest
|
||||||
container_name: mycofi-earth-website
|
container_name: mycofi-earth-website
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
|
||||||
- "3003:3000" # Expose on port 3003 to avoid conflicts with other services
|
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
- HOSTNAME=0.0.0.0
|
- HOSTNAME=0.0.0.0
|
||||||
- PORT=3000
|
- PORT=3000
|
||||||
networks:
|
networks:
|
||||||
- mycofi-network
|
- mycofi-network
|
||||||
|
- traefik-public
|
||||||
labels:
|
labels:
|
||||||
- "com.docker.compose.project=mycofi-earth"
|
- "traefik.enable=true"
|
||||||
- "description=MycoFi Earth Website - Next.js Application"
|
- "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:
|
networks:
|
||||||
mycofi-network:
|
mycofi-network:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
traefik-public:
|
||||||
|
external: true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue