From f0fc7f786af6e23199f1c95b4f428138b027d0d4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 16 Jul 2025 02:47:43 +0000 Subject: [PATCH 1/4] Initial plan From d4c32b4c8ce6102410b8a9223c8bb8c62d23d95f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 16 Jul 2025 02:52:26 +0000 Subject: [PATCH 2/4] Fix PostgreSQL SSL configuration in nextjs-postgres sample Co-authored-by: lionello <591860+lionello@users.noreply.github.com> --- samples/nextjs-postgres/compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: From 43fb6ac61a9caaa7db414d2534b2361dd021003b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 16 Jul 2025 02:53:39 +0000 Subject: [PATCH 3/4] Add database SSL configuration documentation to nextjs-postgres README Co-authored-by: lionello <591860+lionello@users.noreply.github.com> --- samples/nextjs-postgres/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/samples/nextjs-postgres/README.md b/samples/nextjs-postgres/README.md index 44ff243a..16173ac3 100644 --- a/samples/nextjs-postgres/README.md +++ b/samples/nextjs-postgres/README.md @@ -25,6 +25,10 @@ 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. + ## Deploying From 2f6eff205d3f54e95fe2d276cc78e6d2d3dcc6f7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 16 Jul 2025 05:31:30 +0000 Subject: [PATCH 4/4] Add defang config command example for POSTGRES_SSL configuration Co-authored-by: lionello <591860+lionello@users.noreply.github.com> --- samples/nextjs-postgres/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/samples/nextjs-postgres/README.md b/samples/nextjs-postgres/README.md index 16173ac3..f2c3d999 100644 --- a/samples/nextjs-postgres/README.md +++ b/samples/nextjs-postgres/README.md @@ -27,7 +27,11 @@ 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. +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