Update Dockerfile
Browse files- Dockerfile +11 -6
Dockerfile
CHANGED
|
@@ -4,9 +4,18 @@ FROM ghcr.io/gotify/server:latest
|
|
| 4 |
RUN mkdir -p /home/user/gotify/images \
|
| 5 |
/home/user/gotify/plugins \
|
| 6 |
/home/user/gotify/data \
|
| 7 |
-
/home/user/entrypoint
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
chown -R 1000:1000 /home/user
|
| 9 |
|
|
|
|
| 10 |
USER 1000
|
| 11 |
|
| 12 |
# Hugging Face Spaces provides $PORT (default 7860)
|
|
@@ -20,11 +29,7 @@ ENV GOTIFY_DATABASE_PATH=/home/user/gotify/data/gotify.db
|
|
| 20 |
ENV BACKUP_FILE=gotify-db.enc
|
| 21 |
ENV BACKUP_INTERVAL=300
|
| 22 |
|
| 23 |
-
COPY entrypoint.sh /home/user/entrypoint/entrypoint.sh
|
| 24 |
-
COPY backup.sh /home/user/entrypoint/backup.sh
|
| 25 |
-
COPY restore.sh /home/user/entrypoint/restore.sh
|
| 26 |
-
RUN chmod +x /home/user/entrypoint/*.sh
|
| 27 |
-
|
| 28 |
EXPOSE 7860
|
| 29 |
|
|
|
|
| 30 |
ENTRYPOINT ["/home/user/entrypoint/entrypoint.sh"]
|
|
|
|
| 4 |
RUN mkdir -p /home/user/gotify/images \
|
| 5 |
/home/user/gotify/plugins \
|
| 6 |
/home/user/gotify/data \
|
| 7 |
+
/home/user/entrypoint
|
| 8 |
+
|
| 9 |
+
# Copy scripts while still root
|
| 10 |
+
COPY entrypoint.sh /home/user/entrypoint/entrypoint.sh
|
| 11 |
+
COPY backup.sh /home/user/entrypoint/backup.sh
|
| 12 |
+
COPY restore.sh /home/user/entrypoint/restore.sh
|
| 13 |
+
|
| 14 |
+
# Make scripts executable and set ownership
|
| 15 |
+
RUN chmod +x /home/user/entrypoint/*.sh && \
|
| 16 |
chown -R 1000:1000 /home/user
|
| 17 |
|
| 18 |
+
# Switch to HF default user
|
| 19 |
USER 1000
|
| 20 |
|
| 21 |
# Hugging Face Spaces provides $PORT (default 7860)
|
|
|
|
| 29 |
ENV BACKUP_FILE=gotify-db.enc
|
| 30 |
ENV BACKUP_INTERVAL=300
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
EXPOSE 7860
|
| 33 |
|
| 34 |
+
# Entry point runs restore → gotify → backups
|
| 35 |
ENTRYPOINT ["/home/user/entrypoint/entrypoint.sh"]
|