Some checks failed
Build and Deploy koneko.rocks / build-and-deploy (push) Has been cancelled
18 lines
746 B
YAML
18 lines
746 B
YAML
services:
|
|
web:
|
|
image: nginx:alpine # Use the official NGINX Alpine image
|
|
volumes:
|
|
- ./index.html:/usr/share/nginx/html/index.html # Map the local index.html to the container's directory
|
|
labels:
|
|
- "traefik.enable=true" # Enable this container to be routed by Traefik
|
|
- "traefik.http.routers.myapp.rule=Host(`koneko.rocks`)"
|
|
- "traefik.http.services.myapp.loadbalancer.server.port=80" # Expose the NGINX container on port 80
|
|
networks:
|
|
- frontend # Connect this service to the same network as Traefik
|
|
restart: unless-stopped # Optionally restart the container if it stops
|
|
|
|
networks:
|
|
frontend:
|
|
external: true # Use the external Traefik network (if Traefik is running on this network)
|
|
|