Push first release docker
This commit is contained in:
parent
a6612a2caa
commit
5b8bc369aa
39
vitallink/Dockerfile
Normal file
39
vitallink/Dockerfile
Normal file
@ -0,0 +1,39 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Install Node.js
|
||||
RUN apt-get update && apt-get install -y curl && \
|
||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
||||
apt-get install -y nodejs && \
|
||||
apt-get clean
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy Python requirements
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy backend
|
||||
COPY backend backend/
|
||||
COPY simulator simulator/
|
||||
|
||||
# Copy and build frontends
|
||||
COPY frontend/dashboard frontend/dashboard/
|
||||
COPY frontend/kiosk frontend/kiosk/
|
||||
|
||||
# Build frontends
|
||||
WORKDIR /app/frontend/dashboard
|
||||
RUN npm install && npm run build
|
||||
|
||||
WORKDIR /app/frontend/kiosk
|
||||
RUN npm install && npm run build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Expose ports
|
||||
EXPOSE 8000 5173 5174
|
||||
|
||||
# Start script
|
||||
COPY docker-start.sh .
|
||||
RUN chmod +x docker-start.sh
|
||||
|
||||
CMD ["./docker-start.sh"]
|
||||
14
vitallink/docker-compose.yml
Normal file
14
vitallink/docker-compose.yml
Normal file
@ -0,0 +1,14 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
vitallink:
|
||||
build: .
|
||||
ports:
|
||||
- "8000:8000"
|
||||
- "5173:5173"
|
||||
- "5174:5174"
|
||||
volumes:
|
||||
- ./simulator/wristband_config.yaml:/app/simulator/wristband_config.yaml
|
||||
- ./vitallink.db:/app/vitallink.db
|
||||
restart: unless-stopped
|
||||
network_mode: host
|
||||
18
vitallink/docker-start.sh
Executable file
18
vitallink/docker-start.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Start backend
|
||||
python backend/server.py &
|
||||
|
||||
# Start wristband system
|
||||
python simulator/main_runner.py &
|
||||
|
||||
# Serve dashboard
|
||||
cd frontend/dashboard
|
||||
python -m http.server 5173 -d dist &
|
||||
|
||||
# Serve kiosk
|
||||
cd ../kiosk
|
||||
python -m http.server 5174 -d dist &
|
||||
|
||||
# Keep container running
|
||||
wait
|
||||
BIN
vitallink/vitallink-docker.tar.gz
Normal file
BIN
vitallink/vitallink-docker.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user