jadebot as a service
This commit is contained in:
parent
a82d46a6fc
commit
f0fec97c81
|
@ -2,7 +2,7 @@ FROM debian:stable-slim
|
||||||
RUN apt-get update && apt-get install -y fish toot
|
RUN apt-get update && apt-get install -y fish toot
|
||||||
ADD ./jbmasto/* /root
|
ADD ./jbmasto/* /root
|
||||||
RUN mkdir -p /root/.config/toot
|
RUN mkdir -p /root/.config/toot
|
||||||
RUN --mount=type=secret,id=config cat /run/secrets/config > /root/.config/toot/config.json
|
RUN --mount=type=secret,id=config cp /run/secrets/config /root/.config/toot/config.json
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
CMD ./markov.fish
|
CMD ./markov.fish
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
[Unit]
|
||||||
|
Description=jbmasto.service
|
||||||
|
Wants=network.target
|
||||||
|
After=network-online.target
|
||||||
|
RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage
|
||||||
|
|
||||||
|
# %E is "the XDG_CONFIG path"
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Environment=PODMAN_SYSTEMD_UNIT=%n
|
||||||
|
Restart=on-failure
|
||||||
|
TimeoutStopSec=70
|
||||||
|
ExecStart=/usr/bin/podman run -d --name=jbmasto localhost/jbmasto
|
||||||
|
ExecStop=/usr/bin/podman stop jbmasto
|
||||||
|
ExecStopPost=/usr/bin/podman rm jbmasto
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target default.target
|
Loading…
Reference in New Issue