Skip to content

Commit

Permalink
Merge pull request #161 from waifuvault/add-docker
Browse files Browse the repository at this point in the history
support docker
  • Loading branch information
VictoriqueMoe committed Jun 26, 2024
2 parents a6b0b5a + 50bc0e8 commit cb2981b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist/
21 changes: 21 additions & 0 deletions Dockerfile
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" ]
16 changes: 16 additions & 0 deletions docker-compose.yml
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

0 comments on commit cb2981b

Please sign in to comment.