Fix a docker rebuild issue #88

Merged
hodlbod merged 6 commits from bugfix/docker-rebuild into dev 2026-03-03 19:52:23 +00:00
2 changed files with 15 additions and 0 deletions
Showing only changes of commit 3dde0253e6 - Show all commits
+9
View File
@@ -2,3 +2,12 @@ node_modules
android
ios
build
# Git
.git
.gitignore
# Env files (use build args instead; .env.template is copied for defaults)
.env
.env.local
.env.*.local
+6
View File
@@ -1,3 +1,6 @@
# Pass the build hash as an argument:
Review

I changed this to a two-stage docker build mostly because include .env in an image seems dangerous even if none of the env values are secrets at this time.

I changed this to a two-stage docker build mostly because include .env in an image seems dangerous even if none of the env values are secrets at this time.
# docker build --build-arg VITE_BUILD_HASH=$(git rev-parse --short HEAD) -t flotilla .
FROM node:20-slim
# Install pnpm
@@ -15,6 +18,9 @@ RUN pnpm i
# Copy the rest of the application
COPY . .
ARG VITE_BUILD_HASH
ENV VITE_BUILD_HASH=${VITE_BUILD_HASH}
# Build the application
ENV NODE_OPTIONS=--max_old_space_size=16384
RUN pnpm run build