Skip to content

Commit

Permalink
Dockerise
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryQW committed Oct 16, 2018
1 parent 53253b8 commit 89c9fbf
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
node_modules
npm-debug.log
Dockerfile*
docker-compose*
.dockerignore
.git
.gitignore
.env
*/bin
*/obj
README.md
LICENSE
.vscode
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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 && mv node_modules ../
COPY . .

EXPOSE 8080

ENTRYPOINT ["node", "app.js"]

CMD ["node", "app.js"]
15 changes: 15 additions & 0 deletions docker-compose.example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3'

services:
unblockneteasemusic:
image: nondanee/unblockneteasemusic
build: .
environment:
NODE_ENV: production
entrypoint:
- node
- app.js
- -p
- "10000"
ports:
- 10000:10000
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: '3'

services:
unblockneteasemusic:
image: nondanee/unblockneteasemusic
build: .
environment:
NODE_ENV: production
ports:
- 8080:8080

0 comments on commit 89c9fbf

Please sign in to comment.