diff --git a/Dockerfile b/Dockerfile index 3133050a..06050e12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,27 @@ # Build stage -FROM node:16-buster-slim AS build +FROM node:20-buster-slim AS base WORKDIR /app COPY package.json yarn.lock ./ -RUN apt-get update && \ - yarn install --production && \ +RUN apt update -y && \ + apt upgrade -y + +FROM base as dev + +RUN yarn && \ rm -rf /app/node_modules/.cache +ENTRYPOINT ["yarn"] +FROM base AS build COPY . . -RUN yarn build --production +RUN yarn build --production && \ + rm -rf /app/node_modules/.cache # Final stage -FROM node:16-buster-slim AS final +FROM node:20-buster-slim AS final WORKDIR /app diff --git a/docker-compose.dev.yaml b/docker-compose.dev.yaml new file mode 100644 index 00000000..5ae7ccc2 --- /dev/null +++ b/docker-compose.dev.yaml @@ -0,0 +1,11 @@ +version: '3.9' +services: + web-check: + container_name: Web-Check + command: dev + build: + target: dev + volumes: + - ./:/app + ports: + - 8080:8888 \ No newline at end of file