mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-10-30 23:51:57 +01:00
Refactor: Move Docker files to project root and update documentation
Moved Dockerfile and docker-compose.yml from docker/ to root directory for simpler workflow. This allows running 'docker compose up' directly without -f flag. Changes: - Moved docker/Dockerfile -> Dockerfile - Moved docker/docker-compose.yml -> docker-compose.yml - Updated docker-compose.yml context and env_file paths - Updated README.md with simplified Docker commands - Updated CLAUDE_CODE_PROMPT.md project structure - Moved .claude/instructions.md to root (from technotes/) - Updated all documentation to reflect new structure Now deployment is simpler: docker compose up -d --build instead of: docker compose -f docker/docker-compose.yml up -d --build
This commit is contained in:
1 parent
4065921c0c
commit
a8393d5815
5 files changed
+25
-31
No files matched your search
@@ -1,35 +0,0 @@
|
||||
# mc-webui Dockerfile
|
||||
# Python 3.11+ with Flask and meshcore-cli
|
||||
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
gcc \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy requirements first for better layer caching
|
||||
COPY requirements.txt .
|
||||
|
||||
# Install Python dependencies
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Install meshcore-cli
|
||||
RUN pip install --no-cache-dir meshcore-cli
|
||||
|
||||
# Copy application code
|
||||
COPY app/ ./app/
|
||||
|
||||
# Expose Flask port
|
||||
EXPOSE 5000
|
||||
|
||||
# Environment variables (can be overridden by docker-compose)
|
||||
ENV FLASK_HOST=0.0.0.0
|
||||
ENV FLASK_PORT=5000
|
||||
ENV FLASK_DEBUG=false
|
||||
|
||||
# Run the application
|
||||
CMD ["python", "-m", "app.main"]
|
||||
@@ -1,32 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc-webui:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile
|
||||
container_name: mc-webui
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${FLASK_PORT:-5000}:5000"
|
||||
devices:
|
||||
- "${MC_SERIAL_PORT}:${MC_SERIAL_PORT}"
|
||||
volumes:
|
||||
- "${MC_CONFIG_DIR}:/root/.config/meshcore:rw"
|
||||
environment:
|
||||
- MC_SERIAL_PORT=${MC_SERIAL_PORT}
|
||||
- MC_DEVICE_NAME=${MC_DEVICE_NAME}
|
||||
- MC_CONFIG_DIR=/root/.config/meshcore
|
||||
- MC_REFRESH_INTERVAL=${MC_REFRESH_INTERVAL:-60}
|
||||
- MC_INACTIVE_HOURS=${MC_INACTIVE_HOURS:-48}
|
||||
- FLASK_HOST=${FLASK_HOST:-0.0.0.0}
|
||||
- FLASK_PORT=${FLASK_PORT:-5000}
|
||||
- FLASK_DEBUG=${FLASK_DEBUG:-false}
|
||||
env_file:
|
||||
- ../.env
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/api/status')"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
Reference in new issue
Block a user