From 2e3b610524f7e834ff78d1ab1b6018b459648309 Mon Sep 17 00:00:00 2001 From: Stan Rozenraukh Date: Mon, 8 May 2023 11:00:17 -0400 Subject: [PATCH] fix: docker build (#53) --- .dockerignore | 17 +++++++++++++++-- Dockerfile | 6 ++++-- frontend/yarnrc.yml | 1 - 3 files changed, 19 insertions(+), 5 deletions(-) delete mode 100644 frontend/yarnrc.yml diff --git a/.dockerignore b/.dockerignore index e19aad8..bb322de 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,19 @@ .dockerignore -.env docker-compose.yml *Dockerfile Makefile -node_modules +server/.env +*.log* +.nuxt +.nitro +.cache +frontend/node_modules +frontend/.output +frontend/dist +frontend/.pnp.* +frontend/.yarn/* +!frontend/.yarn/patches +!frontend/.yarn/plugins +!frontend/.yarn/releases +!frontend/.yarn/sdks +!frontend/.yarn/versions diff --git a/Dockerfile b/Dockerfile index 9eec689..3f0aadd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,10 @@ FROM node:19.6-alpine as frontend +RUN corepack enable WORKDIR /app -COPY frontend/package.json frontend/yarn.lock ./ -RUN yarn install +COPY frontend/.yarn .yarn/ +COPY frontend/package.json frontend/yarn.lock frontend/.yarnrc.yml ./ +RUN yarn COPY frontend /app RUN yarn run generate diff --git a/frontend/yarnrc.yml b/frontend/yarnrc.yml deleted file mode 100644 index 6d43be2..0000000 --- a/frontend/yarnrc.yml +++ /dev/null @@ -1 +0,0 @@ -nodeLinker: node_modules