Dockerize
This commit is contained in:
parent
24ecd1be28
commit
22b536454b
4 changed files with 43 additions and 0 deletions
13
.dockerignore
Normal file
13
.dockerignore
Normal 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
8
Dockerfile
Normal 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
12
docker-compose.debug.yml
Normal 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
10
docker-compose.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
version: '2.1'
|
||||||
|
|
||||||
|
services:
|
||||||
|
christmas-community:
|
||||||
|
image: christmas-community
|
||||||
|
build: .
|
||||||
|
environment:
|
||||||
|
NODE_ENV: production
|
||||||
|
ports:
|
||||||
|
- 3000:3000
|
Loading…
Reference in a new issue