aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorKevin J Hoerr <kjhoerr@protonmail.com>2021-09-20 19:43:18 +0000
committerKevin J Hoerr <kjhoerr@protonmail.com>2021-09-20 19:43:18 +0000
commitf830bab4ec14f3fe814962a6a2dee180149c3a6a (patch)
tree9a7c3138c0afd2ce5423002d6d8163bbf39ea318 /Dockerfile
parent67c22d10e4583e29d33933e4b1b88f9d02f3da47 (diff)
downloadao-coverage-f830bab4ec14f3fe814962a6a2dee180149c3a6a.tar.gz
ao-coverage-f830bab4ec14f3fe814962a6a2dee180149c3a6a.tar.bz2
ao-coverage-f830bab4ec14f3fe814962a6a2dee180149c3a6a.zip
The Whole Barnshow Commit
- Use yarn-berry instead of npm, with Zero Install feature and goodies - Add `initializeToken` to post unique token to logs on startup - Package upgrades - Fix index.html.template tests I will never do this again
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Dockerfile b/Dockerfile
index 90d232d..e6e78c5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -5,20 +5,27 @@ WORKDIR /app
# Stage 2. Dependencies
FROM base AS dependencies
COPY package*.json ./
-RUN npm install
+COPY yarn.lock ./
+COPY .yarnrc.yml ./
+COPY .yarn ./.yarn
+RUN yarn install
# Stage 3. TS compilation
FROM dependencies AS build
COPY src /app/src
COPY tsconfig.json /app
-RUN npm run tsc
+RUN yarn run tsc
# Stage 4. Release Image
FROM node:lts-alpine AS release
WORKDIR /app
COPY --from=dependencies /app/package.json ./
-RUN npm install --only=production
+COPY --from=dependencies /app/yarn.lock ./
+COPY --from=dependencies /app/.yarnrc.yml ./
+COPY --from=dependencies /app/.yarn/releases ./.yarn/releases
+COPY --from=dependencies /app/.yarn/cache ./.yarn/cache
+RUN yarn install && yarn cache clean
COPY --from=build /app/build ./build
COPY public ./public