use supervisor
This commit is contained in:
parent
7e04777678
commit
56bf186922
@ -1,4 +1,4 @@
|
|||||||
FROM debian:buster
|
FROM debian:bullseye
|
||||||
|
|
||||||
LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>"
|
LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>"
|
||||||
LABEL ImageName="registry.hottis.de/dockerized/mosquitto-with-auth"
|
LABEL ImageName="registry.hottis.de/dockerized/mosquitto-with-auth"
|
||||||
@ -10,7 +10,9 @@ ARG MOSQ_GID="1883"
|
|||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
apt update && \
|
apt update && \
|
||||||
apt install -y mariadb-client openssl libwebsockets8 certbot && \
|
apt install -y mariadb-client openssl libwebsockets8 certbot bash cron supervisor vim-tiny && \
|
||||||
|
update-alternative --set editor /usr/bin/vim.tiny && \
|
||||||
|
update-alternative --set vi /usr/bin/vim.tiny && \
|
||||||
groupadd -r -g $MOSQ_GID $MOSQ_USER && \
|
groupadd -r -g $MOSQ_GID $MOSQ_USER && \
|
||||||
useradd -m -r -u $MOSQ_UID -g $MOSQ_USER $MOSQ_USER && \
|
useradd -m -r -u $MOSQ_UID -g $MOSQ_USER $MOSQ_USER && \
|
||||||
mkdir -p /opt/data
|
mkdir -p /opt/data
|
||||||
@ -18,9 +20,11 @@ RUN \
|
|||||||
|
|
||||||
COPY opt/ /opt
|
COPY opt/ /opt
|
||||||
COPY etc/ /opt/etc
|
COPY etc/ /opt/etc
|
||||||
|
COPY supervisor-mosquitto.conf /etc/supervisor/conf.d/
|
||||||
|
|
||||||
VOLUME /opt/etc
|
VOLUME /opt/etc
|
||||||
VOLUME /opt/data
|
VOLUME /opt/data
|
||||||
|
|
||||||
EXPOSE 80/TCP
|
EXPOSE 80/TCP
|
||||||
EXPOSE 443/TCP
|
EXPOSE 443/TCP
|
||||||
EXPOSE 1883/tcp
|
EXPOSE 1883/tcp
|
||||||
|
10
supervisor-mosquitto.conf
Normal file
10
supervisor-mosquitto.conf
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[program:mosquitto]
|
||||||
|
environment=LD_LIBRARY_PATH="/opt/lib"
|
||||||
|
command=/opt/sbin/mosquitto -c /opt/etc/mosquitto/mosquitto.conf
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
|
||||||
|
[program:certbot]
|
||||||
|
command=/usr/bin/certbot renew --standalone
|
||||||
|
autostart=false
|
||||||
|
autorestart=false
|
Loading…
x
Reference in New Issue
Block a user