mirror of
https://github.com/detleph/server.git
synced 2026-09-07 07:56:18 +02:00
Change layer order (make caching more effecient)
This commit is contained in:
+10
-9
@@ -3,23 +3,24 @@
|
|||||||
FROM node:17-alpine3.12
|
FROM node:17-alpine3.12
|
||||||
|
|
||||||
# Create directory for the app
|
# Create directory for the app
|
||||||
RUN mkdir /home/server
|
RUN mkdir /app
|
||||||
|
|
||||||
# Selectively copy the required files and directories
|
# Copy dependency files
|
||||||
ADD prisma/ /home/app/prisma/
|
COPY package.json package-lock.json /app
|
||||||
ADD scripts/ /home/app/scripts/
|
|
||||||
ADD src/ /home/app/src/
|
|
||||||
COPY package-lock.json /home/app
|
|
||||||
COPY package.json /home/app
|
|
||||||
COPY tsconfig.json /home/app
|
|
||||||
|
|
||||||
# Change directory into the container
|
# Change directory into the container
|
||||||
WORKDIR /home/app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN npm i -g typescript
|
RUN npm i -g typescript
|
||||||
RUN npm i
|
RUN npm i
|
||||||
|
|
||||||
|
# Selectively copy the required files and directories
|
||||||
|
ADD prisma/ /app/prisma/
|
||||||
|
ADD scripts/ /app/scripts/
|
||||||
|
ADD src/ /app/src/
|
||||||
|
COPY tsconfig.json /app
|
||||||
|
|
||||||
# Generate the prisma client
|
# Generate the prisma client
|
||||||
RUN npx prisma generate
|
RUN npx prisma generate
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user