homelab/compose/services/code-server/compose.yaml
Eduardo Figueroa 60781182f6 feat(security): Restrict sensitive services to local network
Apply local-only middleware to:
- Backrest (backup management)
- Code Server (IDE)
- Ollama (LLM API)

These services now require both SSO authentication and local network
access (10.0.0.0/16), preventing external access while maintaining
convenience on LAN.
2025-12-04 18:43:46 +00:00

42 lines
1.1 KiB
YAML

# code-server - VS Code in the browser with AI coding support
# Docs: https://github.com/coder/code-server
services:
code-server:
container_name: code-server
image: lscr.io/linuxserver/code-server:latest
restart: unless-stopped
env_file:
- .env
volumes:
- ./config:/config
# Mount your homelab directory for editing
- /home/eduardo_figueroa/homelab:/config/workspace/homelab
networks:
- homelab
labels:
# Traefik
traefik.enable: true
traefik.docker.network: homelab
# Web UI
traefik.http.routers.code-server.rule: Host(`code.fig.systems`)
traefik.http.routers.code-server.entrypoints: websecure
traefik.http.routers.code-server.tls.certresolver: letsencrypt
traefik.http.services.code-server.loadbalancer.server.port: 8443
# SSO Protection and restrict to local network
traefik.http.routers.code-server.middlewares: tinyauth,local-only
# Homarr Discovery
homarr.name: Code Server (IDE)
homarr.group: Services
homarr.icon: mdi:microsoft-visual-studio-code
networks:
homelab:
external: true