build: add Docker
This commit is contained in:
commit
96167de713
3
.dockerignore
Normal file
3
.dockerignore
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/Dockerfile
|
||||||
|
/docker-compose.yaml
|
||||||
|
/node_modules/
|
15
Dockerfile
Normal file
15
Dockerfile
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
FROM node:16-bullseye AS base
|
||||||
|
|
||||||
|
ENV PATH=${PATH}:/app/node_modules/.bin
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN chown node:node -R /app
|
||||||
|
|
||||||
|
USER node
|
||||||
|
|
||||||
|
COPY --chown=node:node package.* ./
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
COPY --chown=node:node . .
|
9
docker-compose.yaml
Normal file
9
docker-compose.yaml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
build:
|
||||||
|
context: "."
|
||||||
|
volumes:
|
||||||
|
- "./:/app"
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
command: ["next", "dev"]
|
Loading…
Reference in a new issue