Merge branch 'master' of gitea.leon.etiennes.de:leonetienne/Sellery

This commit is contained in:
Leonetienne 2022-04-10 16:19:42 +02:00
commit ce3541c831
4 changed files with 42 additions and 1 deletions

1
.gitignore vendored
View File

@ -3,4 +3,5 @@
/node_modules/
*.pem
/failed-login-attempts.txt
/docker-compose.yml

21
Dockerfile Normal file
View File

@ -0,0 +1,21 @@
FROM node
# Install the correct npm version
RUN npm install -g n
COPY ./.nvmrc /app/.nvmrc
RUN n install `cat /app/.nvmrc`
# Install node packages
COPY ./package.json /app/package.json
COPY ./package-lock.json /app/package-lock.json
RUN cd /app && npm install
# Set up the entry point
WORKDIR /app
COPY ./entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
ENTRYPOINT ["/app/entrypoint.sh"]
# Run the server
CMD ["node", "/app/server.js"]

View File

@ -5,7 +5,7 @@
# So, if you want to serve relative paths, use:
# $WORKING_DIR/relative/path
# Paths should NOT end with a '/'!
WEBROOT = '$WORKING_DIR'
WEBROOT = '/var/www/html'
# This is the SHA512 digest to check the password against
PASSWD_HASH = '034ff213a060a0888230c3934cfb1cb1f80ab3f211a114b713598efac2d1a68f8d3402c6b08ace2f3990c4c029351d1141cf47ebc378fc9a83a5dddda6e38a8c'

19
entrypoint.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
# # CD into our application directory
# echo CD into our application directory
# cd /app
#
# # Use the correct node version
# echo Use the correct node version
# npm install -g n
# n install `cat .nvmrc`
#
# # Install all our packages
# echo Install all our packages
# npm install
# Start the server
echo Start the server
exec $@