Skip to content

Conversation

@productdevbook
Copy link
Owner

Summary

  • Fixed Docker build failure caused by missing environment variables during build process
  • Added ARG declarations and ENV setup in Dockerfile build stage
  • Added build-args to GitHub Actions workflow with dummy values for build-time usage

Problem

The GitHub Actions Docker build was failing with exit code 1 because the Nuxt build process requires environment variables (DATABASE_URL, JWT_SECRET, ENCRYPTION_KEY, WEBHOOK_SECRET) during build time for GraphQL schema generation and other build processes.

Solution

  • Added ARG declarations in Dockerfile for all required environment variables
  • Set ENV variables in build stage using ARG values
  • Added build-args to GitHub Actions workflow with dummy values (safe for build-time usage)
  • These dummy values are only used during build and don't affect runtime security

Test plan

  • Docker build now includes required environment variables during build stage
  • GitHub Actions workflow provides build arguments for successful builds
  • Verify GitHub Actions workflow runs successfully with these changes
  • Confirm Docker images build and publish correctly

Fixes the build failure referenced in GitHub Actions workflow run.

The Docker build process was failing because the Nuxt build requires
environment variables (DATABASE_URL, JWT_SECRET, etc.) during build time
for GraphQL schema generation and other build processes.

- Add ARG declarations in Dockerfile for required environment variables
- Set ENV variables in build stage using ARG values
- Add build-args to GitHub Actions workflow with dummy values
- This resolves the "exit code: 1" error in Docker Hub publishing workflow

Fixes the build failure in GitHub Actions workflow run.
@productdevbook productdevbook merged commit 7e65d8e into main Aug 19, 2025
@productdevbook productdevbook deleted the fix/docker-build-environment-variables branch August 19, 2025 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants