diff --git a/samples/nextjs-postgres/README.md b/samples/nextjs-postgres/README.md index 44ff243a..f2c3d999 100644 --- a/samples/nextjs-postgres/README.md +++ b/samples/nextjs-postgres/README.md @@ -25,6 +25,14 @@ For this sample, you will need to provide the following [configuration](https:// ### `POSTGRES_PASSWORD` A password that will be used to connect to the Postgres database. +## Database Configuration + +This sample is configured to work with standard PostgreSQL containers that don't have SSL enabled. The production configuration uses `POSTGRES_SSL: false` to ensure compatibility with the default `postgres:16` Docker image. If you're using a managed PostgreSQL service with SSL support, you can set `POSTGRES_SSL: true` in your compose.yaml file, or override it using `defang config`: + +```bash +defang config set POSTGRES_SSL=true +``` + ## Deploying diff --git a/samples/nextjs-postgres/compose.yaml b/samples/nextjs-postgres/compose.yaml index 4c6ebc11..8b8c4333 100644 --- a/samples/nextjs-postgres/compose.yaml +++ b/samples/nextjs-postgres/compose.yaml @@ -15,7 +15,7 @@ services: POSTGRES_HOST: database POSTGRES_PORT: 5432 POSTGRES_DB: postgres - POSTGRES_SSL: true + POSTGRES_SSL: false healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000" ] depends_on: