Coolify writes a .env file into the build context directory which gets COPY'd into the builder container. Next.js then loads these env vars (including DATABASE_URL, GITEA_API_TOKEN etc.) during the build, causing some routes that reference those vars to fail static analysis and be silently dropped from the build output. Exclude all .env* files from the Docker build context so the Next.js build runs with only the vars explicitly passed as build args or set in the Dockerfile. Co-authored-by: Cursor <cursoragent@cursor.com>
198 B
198 B