Dockerize

This commit is contained in:
Wingysam 2018-12-01 10:44:26 -05:00
parent 24ecd1be28
commit 22b536454b
4 changed files with 43 additions and 0 deletions

13
.dockerignore Normal file
View file

@ -0,0 +1,13 @@
node_modules
npm-debug.log
Dockerfile*
docker-compose*
.dockerignore
.git
.gitignore
.env
*/bin
*/obj
README.md
LICENSE
.vscode

8
Dockerfile Normal file
View file

@ -0,0 +1,8 @@
FROM node:11
ENV NODE_ENV production
WORKDIR /usr/src/app
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
RUN npm install --production --silent && mv node_modules ../
COPY . .
EXPOSE 3000
CMD npm start

12
docker-compose.debug.yml Normal file
View file

@ -0,0 +1,12 @@
version: '2.1'
services:
christmas-community:
image: christmas-community
build: .
environment:
NODE_ENV: development
ports:
- 3000:3000
- 9229:9229
command: node --inspect=0.0.0.0:9229 index.js

10
docker-compose.yml Normal file
View file

@ -0,0 +1,10 @@
version: '2.1'
services:
christmas-community:
image: christmas-community
build: .
environment:
NODE_ENV: production
ports:
- 3000:3000