Update Dockerfile
Browse files- Dockerfile +7 -8
Dockerfile
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
FROM gotify/server:latest
|
| 2 |
|
| 3 |
-
# Install needed tools (git + openssl) in the slim base image
|
| 4 |
USER root
|
| 5 |
RUN apt-get update && apt-get install -y git openssl && rm -rf /var/lib/apt/lists/*
|
| 6 |
|
|
@@ -8,24 +7,24 @@ RUN apt-get update && apt-get install -y git openssl && rm -rf /var/lib/apt/list
|
|
| 8 |
RUN mkdir -p /home/user/gotify/images \
|
| 9 |
/home/user/gotify/plugins \
|
| 10 |
/home/user/gotify/data \
|
| 11 |
-
/home/user/entrypoint
|
|
|
|
| 12 |
|
| 13 |
-
# Copy scripts
|
| 14 |
COPY entrypoint.sh /home/user/entrypoint/entrypoint.sh
|
| 15 |
COPY backup.sh /home/user/entrypoint/backup.sh
|
| 16 |
COPY restore.sh /home/user/entrypoint/restore.sh
|
| 17 |
|
| 18 |
-
|
| 19 |
-
RUN chmod +x /home/user/entrypoint/*.sh && \
|
| 20 |
-
chown -R 1000:1000 /home/user
|
| 21 |
|
| 22 |
# Switch to HF default user
|
| 23 |
USER 1000
|
| 24 |
|
| 25 |
-
#
|
| 26 |
ENV GOTIFY_SERVER_PORT=${PORT:-7860}
|
| 27 |
|
| 28 |
-
# SQLite database path
|
|
|
|
| 29 |
ENV GOTIFY_SERVER_KEEPALIVEDIR=/home/user/gotify/data
|
| 30 |
ENV GOTIFY_DATABASE_PATH=/home/user/gotify/data/gotify.db
|
| 31 |
|
|
|
|
| 1 |
FROM gotify/server:latest
|
| 2 |
|
|
|
|
| 3 |
USER root
|
| 4 |
RUN apt-get update && apt-get install -y git openssl && rm -rf /var/lib/apt/lists/*
|
| 5 |
|
|
|
|
| 7 |
RUN mkdir -p /home/user/gotify/images \
|
| 8 |
/home/user/gotify/plugins \
|
| 9 |
/home/user/gotify/data \
|
| 10 |
+
/home/user/entrypoint && \
|
| 11 |
+
chown -R 1000:1000 /home/user
|
| 12 |
|
| 13 |
+
# Copy scripts
|
| 14 |
COPY entrypoint.sh /home/user/entrypoint/entrypoint.sh
|
| 15 |
COPY backup.sh /home/user/entrypoint/backup.sh
|
| 16 |
COPY restore.sh /home/user/entrypoint/restore.sh
|
| 17 |
|
| 18 |
+
RUN chmod +x /home/user/entrypoint/*.sh
|
|
|
|
|
|
|
| 19 |
|
| 20 |
# Switch to HF default user
|
| 21 |
USER 1000
|
| 22 |
|
| 23 |
+
# HF Spaces provides $PORT (default 7860)
|
| 24 |
ENV GOTIFY_SERVER_PORT=${PORT:-7860}
|
| 25 |
|
| 26 |
+
# SQLite database path (pointed inside /home/user/gotify)
|
| 27 |
+
WORKDIR /home/user/gotify
|
| 28 |
ENV GOTIFY_SERVER_KEEPALIVEDIR=/home/user/gotify/data
|
| 29 |
ENV GOTIFY_DATABASE_PATH=/home/user/gotify/data/gotify.db
|
| 30 |
|