ENV PUID=1000
ENV PGID=1000
ENV EXEC_TOOL=gosu
+ENV FLATNOTES_PORT=8080
ENV APP_PATH=/app
ENV FLATNOTES_PATH=/data
COPY server ./server
COPY --from=build ${BUILD_DIR}/client/dist ./client/dist
+COPY entrypoint.sh healthcheck.sh /
+RUN chmod +x /entrypoint.sh /healthcheck.sh
+
VOLUME /data
-EXPOSE 8080/tcp
-HEALTHCHECK --interval=60s --timeout=10s CMD curl -f http://localhost:8080/health || exit 1
+EXPOSE ${FLATNOTES_PORT}/tcp
+HEALTHCHECK --interval=60s --timeout=10s CMD /healthcheck.sh
-COPY entrypoint.sh /
-RUN chmod +x /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
main:app \
--app-dir server \
--host 0.0.0.0 \
- --port 8080 \
+ --port ${FLATNOTES_PORT} \
--proxy-headers \
--forwarded-allow-ips '*'"
echo Starting flatnotes as user ${PUID}...
exec ${EXEC_TOOL} ${PUID}:${PGID} ${flatnotes_command}
-
+
else
echo "A user was set by docker, skipping file permission changes."
echo Starting flatnotes as user $(id -u)...