From 2af066038351ab0634c359a688fe712a539992b4 Mon Sep 17 00:00:00 2001 From: Jan T Date: Wed, 14 Feb 2024 17:18:30 +0200 Subject: Optimize docker image size (#91) * Move prisma to runtime dependencies * Optimize Dockerfile and build script * Fix: remove mention of generated next-env.d.ts in Dockerfile * Add missing reset.d.ts file to Dockerfile * Remove compression steps from Dockerfile and entrypoint script * Add an env file with mocked env vars added for Docker production builds * Use server actions to get runtime env vars * Refactor types and names * Rollback serverActions, use parsed Zod object for runtime env * Reintroduce featureFlags object to avoid passing secret envs to the frontend * Improve string to boolean coercion Co-authored-by: Sebastien Castiel * Run prettier autoformat * Fix type issue, rename function to match behaviour better --------- Co-authored-by: Lauri Vuorela Co-authored-by: Sebastien Castiel --- scripts/build-image.sh | 3 --- 1 file changed, 3 deletions(-) (limited to 'scripts/build-image.sh') diff --git a/scripts/build-image.sh b/scripts/build-image.sh index 95b8acb..c900089 100755 --- a/scripts/build-image.sh +++ b/scripts/build-image.sh @@ -5,9 +5,6 @@ SPLIIT_VERSION=$(node -p -e "require('./package.json').version") # we need to set dummy data for POSTGRES env vars in order for build not to fail docker buildx build \ - --no-cache \ - --build-arg POSTGRES_PRISMA_URL=postgresql://build:@db \ - --build-arg POSTGRES_URL_NON_POOLING=postgresql://build:@db \ -t ${SPLIIT_APP_NAME}:${SPLIIT_VERSION} \ -t ${SPLIIT_APP_NAME}:latest \ . -- cgit v1.3