Skip to content

Commit 83a01bc

Browse files
author
Innokentii Kozlov
committed
update api docker image build
1 parent 8fd1a92 commit 83a01bc

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

api/docker/Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
FROM node:20-alpine as build
1+
ARG GITHUB_TOKEN
2+
3+
FROM node:20-alpine AS build
24
WORKDIR /app
3-
COPY package*.json .
4-
RUN npm install
5+
COPY package*.json ./
6+
RUN echo "registry=https://registry.npmjs.org/" > .npmrc && \
7+
echo "@kesha123:registry=https://npm.pkg.github.com/" >> .npmrc && \
8+
echo "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" >> .npmrc && \
9+
npm install
510
COPY . .
6-
RUN npm run build
711

812
FROM node:20-alpine
913
WORKDIR /app

data/docker/Dockerfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
ARG GITHUB_TOKEN
2-
31
FROM node:20-alpine AS build
42
WORKDIR /app
53
COPY package*.json ./
6-
RUN echo "registry=https://registry.npmjs.org/" > .npmrc && \
7-
echo "@kesha123:registry=https://npm.pkg.github.com/" >> .npmrc && \
8-
echo "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" >> .npmrc && \
9-
npm install
4+
RUN npm install
105
COPY . .
116

127
FROM node:20-alpine AS migrations

0 commit comments

Comments
 (0)