Skip to content

add compose dev and upgrade node image #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
11 changes: 11 additions & 0 deletions docker-compose.dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3.9'
services:
web-check:
container_name: Web-Check
command: dev
build:
target: dev
volumes:
- ./:/app
ports:
- 8080:8888