Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Oct 28, 2023
1 parent 835c975 commit 823d2f7
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 30,625 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:16-alpine as builder
WORKDIR '/app'
COPY package.json .
RUN npm install
COPY . .
RUN npm run build

FROM nginx
COPY --from=builder /app/build /usr/share/nginx/html
12 changes: 12 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:16-alpine

USER node

RUN mkdir -p /home/node/app
WORKDIR /home/node/app

COPY --chown=node:node ./package.json ./
RUN npm install
COPY --chown=node:node ./ ./

CMD ["npm", "start"]
19 changes: 19 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: "3"
services:
web:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "3000:3000"
volumes:
- /home/node/app/node_modules
- .:/home/node/app
tests:
build:
context: .
dockerfile: Dockerfile.dev
volumes:
- /home/node/app/node_modules
- .:/home/node/app
command: ["npm", "run", "test"]
Loading

0 comments on commit 823d2f7

Please sign in to comment.