Fix env variables
This commit is contained in:
parent
51252c2ac3
commit
89b419ed54
2 changed files with 10 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue