Merge pull request #67 from davidmonterocrespo24/website
feat: update docker-compose to include arduino-libs volume; mark subp…pull/74/head
commit
c1da5c8989
|
|
@ -88,7 +88,8 @@ RUN arduino-cli config init \
|
||||||
&& arduino-cli core update-index \
|
&& arduino-cli core update-index \
|
||||||
&& arduino-cli core install arduino:avr \
|
&& arduino-cli core install arduino:avr \
|
||||||
&& arduino-cli core install rp2040:rp2040 \
|
&& arduino-cli core install rp2040:rp2040 \
|
||||||
&& arduino-cli core install esp32:esp32
|
&& arduino-cli core install esp32:esp32 \
|
||||||
|
&& cp -a /root/.arduino15 /root/.arduino15-base
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Seed arduino-cli data into the mounted volume if it's empty
|
||||||
|
# (first deploy or after volume prune). The base cores (avr, rp2040, esp32)
|
||||||
|
# were installed at build time and saved to /root/.arduino15-base.
|
||||||
|
if [ ! -f /root/.arduino15/arduino-cli.yaml ]; then
|
||||||
|
echo "📦 Seeding arduino-cli cores into volume..."
|
||||||
|
cp -a /root/.arduino15-base/* /root/.arduino15/ 2>/dev/null || \
|
||||||
|
cp -a /root/.arduino15-base/. /root/.arduino15/
|
||||||
|
fi
|
||||||
|
|
||||||
# Start FastAPI backend in the background on port 8001
|
# Start FastAPI backend in the background on port 8001
|
||||||
echo "🚀 Starting Velxio Backend..."
|
echo "🚀 Starting Velxio Backend..."
|
||||||
uvicorn app.main:app --host 127.0.0.1 --port 8001 &
|
uvicorn app.main:app --host 127.0.0.1 --port 8001 &
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,13 @@ services:
|
||||||
- DATA_DIR=/app/data
|
- DATA_DIR=/app/data
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/app/data
|
- ./data:/app/data
|
||||||
|
- arduino-libs:/root/.arduino15
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 90s
|
start_period: 90s
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
arduino-libs:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue