Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jul 16, 2025

The nextjs-postgres sample was failing to deploy due to a PostgreSQL SSL configuration mismatch. The deployment logs showed:

Error: The server does not support SSL connections

Root Cause

The production compose.yaml had POSTGRES_SSL: true but the standard postgres:16 Docker image doesn't have SSL configured by default, causing the connection to fail.

Changes Made

  1. Fixed SSL Configuration: Changed POSTGRES_SSL from true to false in compose.yaml to match the reality that the PostgreSQL container doesn't support SSL connections
  2. Added Documentation: Updated README.md to explain database SSL configuration options for users who might need SSL with managed databases

Testing

  • ✅ Next.js application builds successfully
  • ✅ SSL configuration logic validated with test cases
  • ✅ Docker Compose configurations validated for both production and development
  • ✅ Development configuration unchanged (still uses POSTGRES_SSL: "")

The fix is minimal and surgical - only one line changed in the core configuration file, with additional documentation for clarity. This aligns the configuration with the actual capabilities of the PostgreSQL Docker container being used.

Fixes #419.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Samples Checklist

✅ All good!

@Copilot Copilot AI changed the title [WIP] nextjs-postgres sample fails to deploy Fix PostgreSQL SSL configuration in nextjs-postgres sample Jul 16, 2025
@Copilot Copilot AI requested a review from lionello July 16, 2025 02:54
@Copilot Copilot AI requested a review from lionello July 16, 2025 05:32
Copilot finished work on behalf of lionello July 16, 2025 05:32
@lionello lionello marked this pull request as ready for review July 16, 2025 05:32
@Copilot Copilot AI had a problem deploying to deploy-changed-samples July 16, 2025 05:32 Failure
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.

nextjs-postgres sample fails to deploy
2 participants