velxio/docker-compose.yml

45 lines
1.4 KiB
YAML

# Development Docker Compose — same image as production for full parity.
# Usage: docker compose up --build
# Access: http://localhost:3080
#
# 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.
services:
velxio:
build:
context: .
dockerfile: Dockerfile.standalone
container_name: velxio-dev
restart: unless-stopped
ports:
- "3080:80"
env_file:
- path: ./backend/.env
required: false
environment:
- DATABASE_URL=sqlite+aiosqlite:////app/data/velxio.db
- DATA_DIR=/app/data
- IDF_PATH=/opt/esp-idf
- IDF_TOOLS_PATH=/root/.espressif
- ARDUINO_ESP32_PATH=/opt/arduino-esp32
# ccache for ESP-IDF compiles — the named volume below persists hits
# across container restarts and image rebuilds. Set IDF_CCACHE_ENABLE=0
# to disable without changing the Dockerfile.
- IDF_CCACHE_ENABLE=1
- CCACHE_DIR=/var/cache/ccache
volumes:
- ./data:/app/data
- arduino-libs:/root/.arduino15
- ccache:/var/cache/ccache
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 90s
volumes:
arduino-libs:
ccache: