Created
October 2, 2019 07:59
-
-
Save VerosK/325d640a56f57571bb46d127cd376c73 to your computer and use it in GitHub Desktop.
icinga2-acutoack daemon build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RUN apt install python3 python3-venv -y | |
RUN mkdir -p /opt/icinga2-autoack && adduser icinga2-autoack | |
RUN python3 -m venv --system-site-packages /opt/icinga2-autoack/__venv__ | |
ADD README.md build-requirements.txt /opt/icinga2-autoack/ | |
RUN /opt/icinga2-autoack/__venv__/bin/pip install -r /opt/icinga2-autoack/build-requirements.txt | |
RUN touch ./opt/icinga2-autoack/.env | |
ADD build/configs/icinga2-autoack.service /etc/systemd/system/icinga2-autoack.service | |
ADD build/scripts/*.sh /.build/scripts/ | |
ADD *.py /opt/icinga2-autoack/ | |
#EXPOSE 3141 | |
#ENTRYPOINT [ "/docker-entrypoint.sh" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Icinga2 autoack | |
After=icinga2.target | |
[Service] | |
WorkingDirectory=/opt/icinga2-autoack | |
User=icinga2-autoack | |
Group=icinga2-autoack | |
ExecStart=/opt/icinga2-autoack/__venv__/bin/python3 /opt/icinga2-autoack/auto_ack.py | |
# use optional environment files | |
EnvironmentFile=-/opt/icinga2-autoack/.env | |
Restart=always | |
KillSignal=SIGQUIT | |
RestartSec=10 | |
Type=simple | |
StandardError=syslog | |
NotifyAccess=all | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment