-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #161 from waifuvault/add-docker
support docker
- Loading branch information
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM node:lts as base | ||
|
||
WORKDIR /home/node/app | ||
|
||
COPY package*.json ./ | ||
|
||
RUN npm i | ||
|
||
COPY . . | ||
|
||
FROM base as production | ||
|
||
ENV NODE_PATH=./dist | ||
|
||
RUN npm run build | ||
|
||
EXPOSE 8081 | ||
ENV PORT 8081 | ||
ENV NODE_ENV production | ||
|
||
CMD [ "npm", "run" ,"start:prod" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: '3.8' | ||
services: | ||
server: | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile | ||
args: | ||
- http_proxy | ||
- https_proxy | ||
- no_proxy | ||
image: tsed/server:latest | ||
restart: always | ||
ports: | ||
- "8081:8081" | ||
stdin_open: true # -i | ||
tty: true # -t |