Added entrypoint (docker)

This commit is contained in:
Hexagon 2017-01-15 00:47:20 +01:00
parent 1bf3400ba3
commit e09b3ee92f
3 changed files with 12 additions and 3 deletions

View File

@ -1,8 +1,8 @@
FROM node:alpine
RUN mkdir -p /usr/src/app/public
VOLUME /usr/src/app/public
WORKDIR /usr/src/app
COPY . /usr/src/app
RUN npm install
EXPOSE 8080
ENTRYPOINT [ "docker-entrypoint.sh" ]
CMD [ "npm", "start"]

9
docker-entrypoint.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
set -e
if [ ! -e '/usr/src/app/external-public/index.html' ]; then
cp -R /usr/src/app/public /usr/src/app/external-public
chown -R www-data /usr/src/app/external-public
fi
exec "$@"

View File

@ -1,6 +1,6 @@
{
"name" : "cryptalk",
"version" : "1.1.8",
"version" : "1.1.9",
"description" : "Encrypted HTML5/Node.JS instant chat",
"main" : "server.js",
"subdomain": "cryptalk",