Use standard nginx.conf and only override the site config in sites-available.
This prevents the 'daemon' directive duplicate error.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
nginx was failing to start because:
- User directive needs root privileges (not applicable as coder user)
- Cannot write to /var/log/nginx/ (permission denied)
Solution:
- Use daemon off; in nginx config
- Redirect logs to /tmp instead of /var/log/nginx/
- Write complete nginx.conf with all required directives
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
code-server cannot handle being served under a subpath with Traefik StripPrefix.
Added nginx as reverse proxy that listens on 8080 and proxies to code-server
on 8081. This preserves all URLs and asset paths correctly.
- nginx listens on 0.0.0.0:8080 (external)
- code-server listens on 127.0.0.1:8081 (internal)
- Entrypoint starts nginx + socat + code-server
This fixes 404 errors on workbench.css and asset loading.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
code-server 4.111.0 does not support --base-path option.
Traefik StripPrefix middleware handles path removal instead.
This fixes the 'Unknown option --base-path' crash loop.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
code-server needs to know its base path for correct asset loading.
The Traefik StripPrefix middleware removes the path before requests
reach the container, so assets were loading from wrong URLs.
Solution:
- Entrypoint script reads BASE_PATH env var and passes to code-server
- container_manager.py sets BASE_PATH=/{slug_with_suffix} for vcoder
- code-server now loads assets from correct relative paths
This fixes 404 errors on workbench.css, nls.messages.js, etc.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Integrates PlatformIO-based IDE for embedded systems development:
- user-template-vcoder/Dockerfile: code-server + PlatformIO + cpptools
- Persistent Volumes: Workspace + PlatformIO cache per user
- Auto Volume-Mount in container_manager.py for vcoder containers
- Updated templates.json with vcoder template metadata
- Updated .env.example with vcoder in USER_TEMPLATE_IMAGES
- Comprehensive documentation: docs/templates/VCODER_TEMPLATE.md
Users can now create isolated IDE containers with:
✓ code-server Web IDE (--auth=none, Spawner JWT protection)
✓ PlatformIO for ESP8266/Wemos development
✓ C/C++ IntelliSense (cpptools + clangd extensions)
✓ Persistent workspace and toolchain cache
Build time: 5-10 min (Extensions downloaded from GitHub)
Default resources: 512MB RAM, 0.5 CPU (configurable)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>