Fix env variables

This commit is contained in:
Arthur Belleville 2025-11-14 08:22:48 +01:00
parent 51252c2ac3
commit 89b419ed54
No known key found for this signature in database
2 changed files with 10 additions and 3 deletions

View file

@ -17,7 +17,10 @@ node_modules
**/coverage
**/.vitest
# Environment files (should be injected at runtime)
# Environment files
# Note: .env files in apps/api are included for container defaults
# Override at runtime with docker run -e or --env-file
!apps/api/.env*
**/.env
**/.env.*
!**/.env.example

View file

@ -75,7 +75,9 @@ RUN pnpm install --frozen-lockfile --prod --filter @xtablo/api...
# Set working directory to api app
WORKDIR /app/apps/api
# Note: Environment variables should be injected at runtime via docker run -e or docker-compose
# Copy .env files from build stage if they exist
RUN --mount=type=bind,from=build,source=/app/apps/api,target=/mnt/api \
cp /mnt/api/.env* . 2>/dev/null || true
# Change ownership to nodejs user
RUN chown -R nodejs:nodejs /app
@ -111,7 +113,9 @@ RUN pnpm install --frozen-lockfile --prod --filter @xtablo/api...
# Set working directory to api app
WORKDIR /app/apps/api
# Note: Environment variables should be injected at runtime via docker run -e or docker-compose
# Copy .env files from build stage if they exist
RUN --mount=type=bind,from=build,source=/app/apps/api,target=/mnt/api \
cp /mnt/api/.env* . 2>/dev/null || true
# Change ownership to nodejs user
RUN chown -R nodejs:nodejs /app