Skip to content

Commit

Permalink
fix(fga-eps-mds/2024.2-ARANDU-DOC#42): modify dockerfile and makefile…
Browse files Browse the repository at this point in the history
… commands
  • Loading branch information
gabrielm2q committed Dec 8, 2024
1 parent 8706b03 commit 9a5f77e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
16 changes: 10 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
FROM node:18 AS base
FROM node:18-alpine AS base

FROM base AS deps
RUN apk add --no-cache libc6-compat

WORKDIR /app

COPY package.json package-lock.json* ./
RUN \
if [ -f package-lock.json ]; then npm ci; \
fi
COPY package.json package-lock.json* ./app/
RUN npm ci

RUN npm install nodemon --save-dev

FROM base AS builder
WORKDIR /app
RUN npm install
COPY . .
RUN npm cache clean --force \
&& npm config set registry http://registry.npmjs.org/ \
&& npm install types-registry \
&& npm install

COPY .env .env
RUN npm run build
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
.PHONY: build
build:
npm install && docker-compose build --no-cache
docker-compose build --no-cache

.PHONY: start
start:
docker-compose up

.PHONY: run
run:
npm install && docker-compose build --no-cache && docker-compose up
docker-compose build --no-cache && docker-compose up

.PHONY: stop
stop:
Expand Down

0 comments on commit 9a5f77e

Please sign in to comment.