Initial Commit

This commit is contained in:
seedorf_s1
2020-11-13 09:09:21 +01:00
commit 5a56fc26d2
50 changed files with 5038 additions and 0 deletions

39
Dockerfile Normal file
View File

@@ -0,0 +1,39 @@
FROM node:12-alpine
# set app user
RUN addgroup --gid 800 appuser && \
adduser --uid 800 --ingroup appuser --disabled-password --gecos "" appuser && \
mkdir /app && \
chown appuser:appuser /app
USER appuser
WORKDIR /app
# add proxy configuration
USER root
COPY ./bio-proxy-configuration-for-docker /tmp/bio-data
ARG add_proxy
RUN if [ -n "$add_proxy" ] ; then sed -i 's/\r$//g' /tmp/bio-data/alpine-based.sh && \
chmod a+x /tmp/bio-data/alpine-based.sh && \
/tmp/bio-data/alpine-based.sh && \
rm -r /tmp/bio-data ; fi
USER appuser
# copy data
COPY . .
# install
RUN npm run install-prod
ENV NODE_ENV production
# cleanup
USER root
RUN rm -r ./src ./public/js-source ./bio-proxy-configuration-for-docker && \
npm cache clean --force
USER appuser
# healthcheck
HEALTHCHECK --interval=10s --timeout=2s --start-period=15s \
CMD node ./out/healthcheck.js
# set command
CMD npm run production