Skip to content
This repository has been archived by the owner on Feb 5, 2023. It is now read-only.

Commit

Permalink
add: docker support (not fully tested)
Browse files Browse the repository at this point in the history
  • Loading branch information
Candinya committed Oct 7, 2021
1 parent 7b0c49c commit 32e746f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:16-alpine AS base

WORKDIR /pass

FROM base AS builder

COPY . ./

RUN yarn install
RUN yarn build
RUN rm -rf .git

FROM base AS runner

COPY --from=builder /pass/node_modules ./node_modules
COPY --from=builder /pass/dist ./dist
COPY package.json ./

CMD ["npm", "run", "serv"]
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3'

services:
pass:
build: .
# restart: always
# image: rss3/pass:latest
container_name: pass
ports:
- '127.0.0.1:8080:8080'
environment:
NODE_ENV: production

0 comments on commit 32e746f

Please sign in to comment.