File tree Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 22**
33
44# Include the following
5+ ! .htmlnanorc
56! LICENSE
67! Pipfile
78! Pipfile.lock
8- ! package.json
9- ! package-lock.json
109! client /**
11- ! server /**
1210! entrypoint.sh
13- ! .htmlnanorc
11+ ! healthcheck.sh
12+ ! package-lock.json
13+ ! package.json
14+ ! server /**
1415! vite.config.js
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ ARG BUILD_DIR
2222ENV PUID=1000
2323ENV PGID=1000
2424ENV EXEC_TOOL=gosu
25+ ENV FLATNOTES_PORT=8080
2526
2627ENV APP_PATH=/app
2728ENV FLATNOTES_PATH=/data
@@ -45,10 +46,11 @@ RUN pipenv install --deploy --ignore-pipfile --system && \
4546COPY server ./server
4647COPY --from=build ${BUILD_DIR}/client/dist ./client/dist
4748
49+ COPY entrypoint.sh healthcheck.sh /
50+ RUN chmod +x /entrypoint.sh /healthcheck.sh
51+
4852VOLUME /data
49- EXPOSE 8080 /tcp
50- HEALTHCHECK --interval=60s --timeout=10s CMD curl -f http://localhost:8080/health || exit 1
53+ EXPOSE ${FLATNOTES_PORT} /tcp
54+ HEALTHCHECK --interval=60s --timeout=10s CMD /healthcheck.sh
5155
52- COPY entrypoint.sh /
53- RUN chmod +x /entrypoint.sh
5456ENTRYPOINT [ "/entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ flatnotes_command="python -m \
2222 main:app \
2323 --app-dir server \
2424 --host 0.0.0.0 \
25- --port 8080 \
25+ --port ${FLATNOTES_PORT} \
2626 --proxy-headers \
2727 --forwarded-allow-ips '*'"
2828
@@ -32,7 +32,7 @@ if [ `id -u` -eq 0 ] && [ `id -g` -eq 0 ]; then
3232
3333 echo Starting flatnotes as user ${PUID} ...
3434 exec ${EXEC_TOOL} ${PUID} :${PGID} ${flatnotes_command}
35-
35+
3636else
3737 echo " A user was set by docker, skipping file permission changes."
3838 echo Starting flatnotes as user $( id -u) ...
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ curl -f http://localhost:${FLATNOTES_PORT} /health || exit 1
You can’t perform that action at this time.
0 commit comments