From ebe43a78c94f4488fa3cf40d1a58b0cc1a6f287f Mon Sep 17 00:00:00 2001 From: Adrian Kunz Date: Sat, 7 Dec 2024 17:31:57 +0100 Subject: [PATCH] Docker Updates (#206) * dev: Explicit mongodb version and removed version * build(backend): Don't install cypress * build(frontend): Don't install cypress --- apps/backend/Dockerfile | 6 +++--- apps/frontend/Dockerfile | 2 +- docker-compose.dev.yml | 3 +-- docker-compose.yml | 3 +-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/apps/backend/Dockerfile b/apps/backend/Dockerfile index 11dc5ecb..9eb19a11 100644 --- a/apps/backend/Dockerfile +++ b/apps/backend/Dockerfile @@ -1,7 +1,7 @@ -FROM node:lts-slim as builder +FROM node:lts-slim AS builder WORKDIR /app COPY package.json pnpm-lock.yaml ./ -RUN corepack pnpm install --frozen-lockfile +RUN CYPRESS_INSTALL_BINARY=0 corepack pnpm install --frozen-lockfile COPY . . RUN corepack pnpm run build:backend @@ -9,6 +9,6 @@ FROM node:lts-slim WORKDIR /app COPY --from=builder /app/dist/apps/backend/ ./ ENV NODE_ENV=production -RUN corepack pnpm install # --frozen-lockfile +RUN CYPRESS_INSTALL_BINARY=0 corepack pnpm install --frozen-lockfile EXPOSE 3000 CMD node main.js diff --git a/apps/frontend/Dockerfile b/apps/frontend/Dockerfile index 51092de4..3000572e 100644 --- a/apps/frontend/Dockerfile +++ b/apps/frontend/Dockerfile @@ -1,7 +1,7 @@ FROM node:lts-slim as builder WORKDIR /app COPY package.json pnpm-lock.yaml ./ -RUN corepack pnpm install --frozen-lockfile +RUN CYPRESS_INSTALL_BINARY=0 corepack pnpm install --frozen-lockfile COPY . . ARG APP_VERSION RUN APP_VERSION=$APP_VERSION corepack pnpm run build:frontend diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index cbd0c311..7035dac1 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,7 +1,6 @@ -version: '3' services: database: - image: mongo + image: mongo:7 ports: - "27017:27017" volumes: diff --git a/docker-compose.yml b/docker-compose.yml index 69cef468..1cf6a731 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,6 @@ -version: '3' services: database: - image: mongo + image: mongo:7 ports: - "27017:27017" volumes: