Skip to content

fix: improving the docker-compose page suggesting to create the kong#5216

Open
thesp0nge wants to merge 1 commit into
mainfrom
fix-docker-compose
Open

fix: improving the docker-compose page suggesting to create the kong#5216
thesp0nge wants to merge 1 commit into
mainfrom
fix-docker-compose

Conversation

@thesp0nge
Copy link
Copy Markdown

Improving the docker-compose page suggesting to create the kong user as a regular db user and not as database administrator. This enforces the least minimum privilege principle and it harden a bit the database suggested configuration.

Description

Fixes #issue

Preview Links

Checklist

  • Tested how-to docs. If not, note why here.
  • All pages contain metadata.
  • Any new docs link to existing docs.
  • All autogenerated instructions render correctly (API, decK, Konnect, Kong Manager).
  • Style guide (capitalized gateway entities, placeholder URLs) implemented correctly.
  • Every page has a description entry in frontmatter.
  • Add new pages to the product documentation index (if applicable).

user as a regular db user and not as database administrator.
This enforces the least minimum privilege principle and it harden a bit
the database suggested configuration.
@thesp0nge thesp0nge requested a review from a team as a code owner May 13, 2026 08:25
@netlify
Copy link
Copy Markdown

netlify Bot commented May 13, 2026

Deploy Preview for kongdeveloper ready!

Name Link
🔨 Latest commit 0acd9da
🔍 Latest deploy log https://app.netlify.com/projects/kongdeveloper/deploys/6a04357ceb7cb90008e0a2bb
😎 Deploy Preview https://deploy-preview-5216--kongdeveloper.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 13, 2026

CLA assistant check
All committers have signed the CLA.

@thesp0nge thesp0nge requested a review from silvolu May 13, 2026 10:42
```bash
cat <<EOF > init-db.sql

CREATE USER kong WITH NOSUPERUSER NOCREATEDB NOCREATEROLE PASSWORD 'kong';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the password for the 'kong' user remain in the sql script? Can the script be removed after the installation?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The password for 'kong' user was first written in the docker compose file. I just moved in the init script because I want the 'kong' user to be created with a smaller subset of permissions.

The script is only used after the first docker compose up. In case the user will remove images, purging the volumes data, the script has to be present.

@mcl-kong
Copy link
Copy Markdown

Possibly, this can be further improved by using multiple users with specific privileges: 1 for migrations, 1 for CP, 1 for DP... I got this from @bungle Can you two sync and create a backlog item with this idea?

@Guaris Guaris self-assigned this May 14, 2026
@Guaris
Copy link
Copy Markdown
Contributor

Guaris commented May 14, 2026

Let me know after you and @bungle sync so I can review the doc.

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.

4 participants