Added example docker-compose.yaml

This commit is contained in:
BlueFox 2025-06-16 14:59:17 +02:00
parent c332701357
commit 49173dee84
2 changed files with 11 additions and 2 deletions

View File

@ -2,6 +2,7 @@ FROM python:3.13-slim
RUN useradd --create-home --shell /bin/bash solarcontrol
WORKDIR /script
COPY solarcontrol.py ./
RUN pip install --upgrade pip && pip3 install --no-cache-dir paho-mqtt python-dotenv requests
RUN pip install --upgrade pip
USER solarcontrol
ENTRYPOINT ["/usr/bin/python3", "solarcontrol.py"]
RUN pip install --user --no-cache-dir paho-mqtt python-dotenv requests
CMD ["python", "solarcontrol.py"]

8
docker-compose.yaml Normal file
View File

@ -0,0 +1,8 @@
services:
solarcontrol:
image: bluefox42/solarcontrol:latest
hostname: solarcontrol
container_name: solarcontrol
env_file: ".env"
restart: unless-stopped
stop_grace_period: 15s