Skip to content

Commit

Permalink
Dockerise
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryQW committed Oct 18, 2018
1 parent 4d68312 commit 492e1ad
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .dockerignore
@@ -0,0 +1,13 @@
node_modules
npm-debug.log
Dockerfile*
docker-compose*
.dockerignore
.git
.gitignore
.env
*/bin
*/obj
README.md
LICENSE
.vscode
8 changes: 8 additions & 0 deletions Dockerfile
@@ -0,0 +1,8 @@
FROM node:8.9-alpine
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 changes: 12 additions & 0 deletions docker-compose.debug.yml
@@ -0,0 +1,12 @@
version: '2.1'

services:
opencc.henry.wang:
image: opencc.henry.wang
build: .
environment:
NODE_ENV: development
ports:
- 3000:3000
- 9229:9229
command: node --inspect=0.0.0.0:9229 ./bin/www
10 changes: 10 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,10 @@
version: '2.1'

services:
opencc.henry.wang:
image: opencc.henry.wang
build: .
environment:
NODE_ENV: production
ports:
- 3000:3000

0 comments on commit 492e1ad

Please sign in to comment.