Added example docker-compose.yaml
This commit is contained in:
parent
c332701357
commit
49173dee84
@ -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
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
|
Loading…
x
Reference in New Issue
Block a user