18 lines
559 B
Docker
18 lines
559 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update && apt-get install -y gcc python3-dev && rm -rf /var/lib/apt/lists/*
|
|
RUN pip install --no-cache-dir fastapi uvicorn psutil RPi.GPIO
|
|
|
|
COPY main.py .
|
|
|
|
# Use environment variables from .env file at runtime instead of hardcoding
|
|
# ENV LUNA_API_TOKEN removed
|
|
|
|
# We'll need to mount the host's script if we want to run blinking from the container,
|
|
# but for now let's just expose the stats.
|
|
# Alternatively, we could install what we need.
|
|
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|