2026-04-05 00:27:52 +07:00
|
|
|
# Development Docker Compose — same image as production for full parity.
|
|
|
|
|
# Usage: docker compose up --build
|
|
|
|
|
# Access: http://localhost:3080
|
fix(install): unblock self-hosting + drop forced wokwi clones
Resolves several install pain points reported by users (#108, #120) and
removes the obligatory upstream-clone step that confused contributors and
slowed down every Docker build.
Install fixes:
- nginx: server_name → catch-all default_server, drop Debian's stock site
so reverse-proxied users no longer get the "Welcome to nginx" page.
- entrypoint: auto-generate SECRET_KEY at first boot, persisted under
data/.secret_key. backend/.env is now optional in docker-compose.yml.
- backend: add greenlet>=3.0.0 (SQLAlchemy async dep that was missing on
some Python builds — caused uvicorn startup failures on WSL).
Wokwi libs come from npm:
- @wokwi/elements 1.9.2, avr8js 0.21.0, rp2040js 1.3.2 are pinned in
frontend/package.json. Vite aliases removed.
- Dockerfile.standalone no longer clones avr8js / rp2040js / wokwi-elements
/ wokwi-boards. Frontend stage is just COPY + npm install + build:docker.
- Board SVGs vendored under frontend/public/boards/ (10 deduped against
existing files, 2 truly new). third-party/wokwi-* clones become reference-
only credits — generate-component-metadata.ts skips gracefully when absent.
Production config split out:
- docker-compose.prod.yml, deploy/nginx.prod.conf, nginx-host-velxio*.conf,
update-third-party.bat removed. Production deployment lives in its own
repo: https://github.com/velxio/velxio-prod (host nginx + HTTPS + backups
+ pinned upstream commit).
Verified locally: 1161 frontend tests pass, build:docker completes clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 10:04:11 +07:00
|
|
|
#
|
|
|
|
|
# backend/.env is OPTIONAL. If missing, the entrypoint generates a random
|
|
|
|
|
# SECRET_KEY so the app boots out-of-the-box. Create backend/.env (copy
|
|
|
|
|
# backend/.env.example) only when you need OAuth or want a fixed SECRET_KEY.
|
2026-03-05 05:28:33 +07:00
|
|
|
services:
|
2026-04-05 00:27:52 +07:00
|
|
|
velxio:
|
2026-03-05 05:28:33 +07:00
|
|
|
build:
|
2026-04-05 00:27:52 +07:00
|
|
|
context: .
|
|
|
|
|
dockerfile: Dockerfile.standalone
|
|
|
|
|
container_name: velxio-dev
|
2026-03-05 05:28:33 +07:00
|
|
|
restart: unless-stopped
|
2026-04-05 00:27:52 +07:00
|
|
|
ports:
|
|
|
|
|
- "3080:80"
|
|
|
|
|
env_file:
|
fix(install): unblock self-hosting + drop forced wokwi clones
Resolves several install pain points reported by users (#108, #120) and
removes the obligatory upstream-clone step that confused contributors and
slowed down every Docker build.
Install fixes:
- nginx: server_name → catch-all default_server, drop Debian's stock site
so reverse-proxied users no longer get the "Welcome to nginx" page.
- entrypoint: auto-generate SECRET_KEY at first boot, persisted under
data/.secret_key. backend/.env is now optional in docker-compose.yml.
- backend: add greenlet>=3.0.0 (SQLAlchemy async dep that was missing on
some Python builds — caused uvicorn startup failures on WSL).
Wokwi libs come from npm:
- @wokwi/elements 1.9.2, avr8js 0.21.0, rp2040js 1.3.2 are pinned in
frontend/package.json. Vite aliases removed.
- Dockerfile.standalone no longer clones avr8js / rp2040js / wokwi-elements
/ wokwi-boards. Frontend stage is just COPY + npm install + build:docker.
- Board SVGs vendored under frontend/public/boards/ (10 deduped against
existing files, 2 truly new). third-party/wokwi-* clones become reference-
only credits — generate-component-metadata.ts skips gracefully when absent.
Production config split out:
- docker-compose.prod.yml, deploy/nginx.prod.conf, nginx-host-velxio*.conf,
update-third-party.bat removed. Production deployment lives in its own
repo: https://github.com/velxio/velxio-prod (host nginx + HTTPS + backups
+ pinned upstream commit).
Verified locally: 1161 frontend tests pass, build:docker completes clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 10:04:11 +07:00
|
|
|
- path: ./backend/.env
|
|
|
|
|
required: false
|
2026-03-07 06:32:36 +07:00
|
|
|
environment:
|
|
|
|
|
- DATABASE_URL=sqlite+aiosqlite:////app/data/velxio.db
|
2026-03-07 06:38:06 +07:00
|
|
|
- DATA_DIR=/app/data
|
2026-04-05 00:27:52 +07:00
|
|
|
- IDF_PATH=/opt/esp-idf
|
|
|
|
|
- IDF_TOOLS_PATH=/root/.espressif
|
|
|
|
|
- ARDUINO_ESP32_PATH=/opt/arduino-esp32
|
2026-03-07 06:32:36 +07:00
|
|
|
volumes:
|
|
|
|
|
- ./data:/app/data
|
2026-04-05 00:27:52 +07:00
|
|
|
- arduino-libs:/root/.arduino15
|
2026-03-05 05:28:33 +07:00
|
|
|
healthcheck:
|
2026-04-05 00:27:52 +07:00
|
|
|
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
2026-03-05 05:28:33 +07:00
|
|
|
interval: 30s
|
|
|
|
|
timeout: 10s
|
|
|
|
|
retries: 3
|
2026-04-05 00:27:52 +07:00
|
|
|
start_period: 90s
|
2026-03-05 05:28:33 +07:00
|
|
|
|
2026-04-05 00:27:52 +07:00
|
|
|
volumes:
|
|
|
|
|
arduino-libs:
|