mirror of
https://github.com/BreizhHardware/ntfy_alerts.git
synced 2026-01-18 16:37:28 +01:00
47 lines
1.3 KiB
Docker
47 lines
1.3 KiB
Docker
FROM alpine:3.22 AS base
|
|
|
|
# Copier les binaires précompilés selon l'architecture
|
|
COPY binaries-docker/github-ntfy-amd64 /usr/local/bin/github-ntfy-amd64
|
|
COPY binaries-docker/github-ntfy-arm64 /usr/local/bin/github-ntfy-arm64
|
|
|
|
# Installation des dépendances et configuration du binaire selon l'architecture
|
|
RUN apk add --no-cache sqlite-libs openssl nginx && \
|
|
if [ "$(uname -m)" = "x86_64" ]; then \
|
|
cp /usr/local/bin/github-ntfy-amd64 /usr/local/bin/github-ntfy; \
|
|
elif [ "$(uname -m)" = "aarch64" ]; then \
|
|
cp /usr/local/bin/github-ntfy-arm64 /usr/local/bin/github-ntfy; \
|
|
fi && \
|
|
chmod +x /usr/local/bin/github-ntfy && \
|
|
rm /usr/local/bin/github-ntfy-*
|
|
|
|
WORKDIR /app
|
|
|
|
# Copier les fichiers statiques
|
|
COPY index.html /var/www/html/index.html
|
|
COPY script.js /var/www/html/script.js
|
|
|
|
# Copier la configuration nginx
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
|
|
# Copier le script d'entrée
|
|
COPY entrypoint.sh /
|
|
RUN chmod 700 /entrypoint.sh
|
|
|
|
# Variables d'environnement
|
|
ENV USERNAME="" \
|
|
PASSWORD="" \
|
|
NTFY_URL="" \
|
|
GHNTFY_TIMEOUT="3600" \
|
|
GHNTFY_TOKEN="" \
|
|
DOCKER_USERNAME="" \
|
|
DOCKER_PASSWORD="" \
|
|
GOTIFY_URL="" \
|
|
GOTIFY_TOKEN="" \
|
|
DISCORD_WEBHOOK_URL="" \
|
|
SLACK_WEBHOOK_URL=""
|
|
|
|
RUN mkdir -p /github-ntfy && chmod 755 /github-ntfy
|
|
|
|
EXPOSE 8080 80
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"] |