Dockerified
This commit is contained in:
parent
e126788933
commit
cd2daf4086
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,4 +3,5 @@
|
||||
/node_modules/
|
||||
*.pem
|
||||
/failed-login-attempts.txt
|
||||
/docker-compose.yml
|
||||
|
||||
|
21
Dockerfile
Normal file
21
Dockerfile
Normal 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"]
|
||||
|
@ -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 = 'a3c1443b087cf5338d3696f6029fdf791ee4829a27e19c9f257a06ca0d88b5b518ac9868bb13199e807553bda62d3dc15b6354862f34fcab0a7c4c45530349ea'
|
||||
|
19
entrypoint.sh
Executable file
19
entrypoint.sh
Executable 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 $@
|
||||
|
Loading…
x
Reference in New Issue
Block a user