Added example docker-compose.yaml
This commit is contained in:
@@ -2,6 +2,7 @@ FROM python:3.13-slim
|
|||||||
RUN useradd --create-home --shell /bin/bash solarcontrol
|
RUN useradd --create-home --shell /bin/bash solarcontrol
|
||||||
WORKDIR /script
|
WORKDIR /script
|
||||||
COPY solarcontrol.py ./
|
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
|
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
8
docker-compose.yaml
Normal 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
|
Reference in New Issue
Block a user