Commit Graph

6 Commits

Author SHA1 Message Date
XPS\Micro
0a817fa0d0 fix: Remove duplicate daemon directive in nginx config
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>
2026-03-19 16:29:06 +01:00
XPS\Micro
df5c8a95d4 fix: Fix nginx permission errors - use /tmp for logs
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>
2026-03-19 15:56:10 +01:00
XPS\Micro
22d10330c5 fix: Add nginx reverse proxy for code-server subpath routing
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>
2026-03-19 15:38:58 +01:00
XPS\Micro
5f6b06a66a fix: Remove unsupported --base-path flag from code-server
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>
2026-03-19 14:28:54 +01:00
XPS\Micro
0d1f4f1db9 fix: Add dynamic base-path support for code-server subpath routing
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>
2026-03-19 13:37:16 +01:00
XPS\Micro
28aa41b207 feat: Add ESP8266 IDE (vcoder) Template Integration
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>
2026-03-19 12:05:44 +01:00