File size: 1,006 Bytes
9b345e0 0dde1f1 0345483 ecc7366 0ea480a 14fdf69 0ea480a 14fdf69 0ea480a 0dde1f1 9b345e0 acc6254 0ea480a 69aeb33 acc6254 0ea480a 69aeb33 ecc7366 2b03b2f ecc7366 be6a663 ecc7366 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | FROM gotify/server:latest
USER root
RUN apt-get update && apt-get install -y git openssl && rm -rf /var/lib/apt/lists/*
# Create writable dirs
RUN mkdir -p /home/user/gotify/images \
/home/user/gotify/plugins \
/home/user/gotify/data \
/home/user/entrypoint && \
chown -R 1000:1000 /home/user
# Copy scripts
COPY entrypoint.sh /home/user/entrypoint/entrypoint.sh
COPY backup.sh /home/user/entrypoint/backup.sh
COPY restore.sh /home/user/entrypoint/restore.sh
RUN chmod +x /home/user/entrypoint/*.sh
# Switch to HF default user
USER 1000
# HF Spaces provides $PORT (default 7860)
ENV GOTIFY_SERVER_PORT=${PORT:-7860}
# SQLite database path (pointed inside /home/user/gotify)
WORKDIR /home/user/gotify
ENV GOTIFY_SERVER_KEEPALIVEDIR=/home/user/gotify/data
ENV GOTIFY_DATABASE_PATH=/home/user/gotify/data/gotify.db
# Backup/restore config
ENV BACKUP_FILE=gotify-db.enc
ENV BACKUP_INTERVAL=300
EXPOSE 7860
ENTRYPOINT ["/home/user/entrypoint/entrypoint.sh"]
|