From 610292381f3219b6388fa9807ba5642d8aeebfeb Mon Sep 17 00:00:00 2001 From: mignot Date: Tue, 9 Dec 2025 13:01:42 +0100 Subject: [PATCH 1/7] Improve documentation: add comprehensive README with TOC --- README.md | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/README.md b/README.md index 85ea1bd..559ef00 100644 --- a/README.md +++ b/README.md @@ -1 +1,85 @@ # bodzify-db-postgres + +A customized PostgreSQL Docker image based on PostgreSQL 16.4, configured to allow remote connections with SCRAM-SHA-256 authentication. + +## Table of Contents + +- [Features](#features) +- [Prerequisites](#prerequisites) +- [Building the Image](#building-the-image) +- [Running the Container](#running-the-container) + - [Environment Variables](#environment-variables) + - [Ports](#ports) +- [Connecting to the Database](#connecting-to-the-database) +- [Configuration](#configuration) +- [Files](#files) +- [License](#license) + +## Features + +- Based on official PostgreSQL 16.4 image +- Pre-installed dependencies: gettext, postgresql-client, net-tools +- Configured for remote connections with SCRAM-SHA-256 authentication +- Automatic configuration reload + +## Prerequisites + +- Docker installed on your system + +## Building the Image + +To build the Docker image, run the following command in the project directory: + +```bash +docker build -t bodzify-db-postgres . +``` + +## Running the Container + +To run the PostgreSQL container, use: + +```bash +docker run -d \ + --name my-postgres \ + -e POSTGRES_PASSWORD=mysecretpassword \ + -e POSTGRES_DB=mydatabase \ + -p 5432:5432 \ + bodzify-db-postgres +``` + +### Environment Variables + +The container supports standard PostgreSQL environment variables: + +- `POSTGRES_PASSWORD`: Sets the password for the default postgres user +- `POSTGRES_USER`: Sets the username for the default user (defaults to postgres) +- `POSTGRES_DB`: Sets the name of the default database + +### Ports + +- 5432: Default PostgreSQL port + +## Connecting to the Database + +Once the container is running, you can connect to the database using any PostgreSQL client: + +```bash +psql -h localhost -p 5432 -U postgres -d mydatabase +``` + +## Configuration + +The image includes custom configuration in `setup_conf.sh` that: + +- Adds a pg_hba.conf entry to allow remote connections from any IP with SCRAM-SHA-256 authentication +- Reloads the PostgreSQL configuration + +## Files + +- `Dockerfile`: Docker image definition +- `install_dependencies.sh`: Script to install additional dependencies +- `setup_conf.sh`: Script to configure PostgreSQL for remote access + +## License + +[Specify your license here] From f72ed93150e33e0238485afa8da6d90d6172c414 Mon Sep 17 00:00:00 2001 From: mignot Date: Tue, 9 Dec 2025 13:13:23 +0100 Subject: [PATCH 2/7] Align labeler configuration with current project structure - Update header comment for Bodzify DB Postgres - Remove API component labels (track, artist, album, etc.) - Keep type labels for documentation, CI, Docker, and scripts - Update scripts glob to match .sh files in root directory --- .github/labeler.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..4cc8192 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,34 @@ +# Auto-labeler configuration for Bodzify DB Postgres +# Labels are automatically applied based on file paths changed in PRs + +# Type labels - based on file types and purposes +documentation: + - any: + - changed-files: + - any-glob-to-any-file: + - "README.md" + - "CHANGELOG.md" + - "*.md" + +ci: + - any: + - changed-files: + - any-glob-to-any-file: + - ".github/workflows/**" + - ".github/ISSUE_TEMPLATE/**" + - ".github/pull_request_template.md" + +docker: + - any: + - changed-files: + - any-glob-to-any-file: + - "Dockerfile" + - "docker-compose.yml" + - "docker-compose.*.yml" + - ".dockerignore" + +scripts: + - any: + - changed-files: + - any-glob-to-any-file: + - "*.sh" From ed70f8429208ad8a5e3dd87084fd67bad4beabe4 Mon Sep 17 00:00:00 2001 From: mignot Date: Tue, 9 Dec 2025 13:16:08 +0100 Subject: [PATCH 3/7] docs: add PR template --- .github/pull_request_template.md | 198 +++++++++++++++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..f7bc54d --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,198 @@ +````markdown +## Summary + + + +## Description + + + +## Related Issue + + + +## Type of change + +- [ ] πŸ› Bug fix (non-breaking change) +- [ ] πŸ“¦ Docker image change (base image, packages, startup) +- [ ] πŸ”§ Configuration change (env vars, scripts, defaults) +- [ ] πŸ› οΈ Build/CI change +- [ ] πŸ“š Documentation update +- [ ] ♻️ Refactor / maintenance +- [ ] βœ… Tests added/updated +- [ ] ⚠️ Breaking change + +## Target branch + +- [ ] `main` (hotfixes only) +- [ ] `develop` (features, fixes, and routine work) + +## Changes made + + + +## Testing + + + +### Recommended local checks + +```bash +# Build image +docker build -t bodzify-db-postgres:pr . + +# Run container (example) +docker run --rm -d --name bodzify-db-pr -e POSTGRES_PASSWORD=test -p 5432:5432 bodzify-db-postgres:pr + +# Quick smoke test (ensure psql is installed locally or run in a container) +docker run --rm --network host postgres:16.4 psql -h localhost -U postgres -c '\l' + +# Tear down example +docker stop bodzify-db-pr || true +``` + +### Optional checks + +- Dockerfile linting (hadolint) +- Security scanning (Trivy/Clair), if applicable +- Validate that startup scripts run without errors + +## Checklist + +- [ ] README updated (installation, environment variables, examples) +- [ ] CHANGELOG updated (if applicable) +- [ ] Dockerfile and build steps validated +- [ ] Environment variables documented and safe defaults set +- [ ] No secrets committed in code or Dockerfile +- [ ] CI workflow updated if needed to test the build and run steps +- [ ] Tests added/updated (if applicable) + +## Breaking changes + + + +- [ ] This PR includes breaking changes +- [ ] Migration steps included / documented + +## Screenshots / Logs (if applicable) + + + +## Additional Notes + + + +## Reviewer Notes + + +```` + +## Description + + + + +## Related Issue + + + + +## Type of Change + + + +- [ ] πŸ› Bug fix (non-breaking change which fixes an issue) +- [ ] ✨ New feature (non-breaking change which adds functionality) +- [ ] πŸ’₯ Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] πŸ“š Documentation update +- [ ] ♻️ Refactoring (no functional changes) +- [ ] ⚑ Performance improvement +- [ ] βœ… Test addition/update +- [ ] πŸ”§ Configuration change +- [ ] 🎨 Style/formatting changes +- [ ] 🧹 Chore/maintenance + +## Target Branch + + + +- [ ] `develop` (for features, bug fixes, chores, dependency updates from Dependabot) +- [ ] `main` (for hotfixes only) + +## Changes Made + + + +## Testing + + + +- [ ] All existing tests pass +- [ ] New tests added (if applicable) +- [ ] Manual testing completed (if applicable) + +**Test commands:** + +```bash +# Add test commands here +pytest +``` + +## Checklist + + + +### Code Quality + +- [ ] Code follows project style guidelines ([code-style.md](code-style.md)) +- [ ] Code follows Django best practices +- [ ] Type hints added where appropriate +- [ ] No debug statements or commented-out code +- [ ] One class per file (if applicable) +- [ ] Field name constants used (if applicable) + +### Tests + +- [ ] All tests pass: `pytest` +- [ ] New features have corresponding tests +- [ ] Bug fixes include regression tests +- [ ] Tests follow naming convention: `test_{scenario}_then_{expected_result}` +- [ ] Each test focuses on a single scenario + +### Documentation + +- [ ] Docstrings updated (only when needed) +- [ ] README updated (if applicable) +- [ ] CHANGELOG.md updated in `[Unreleased]` section +- [ ] Type hints added/updated + +### Git Hygiene + +- [ ] Commit messages follow convention: `(): ` +- [ ] Branch is up to date with target branch +- [ ] Branch follows naming convention (`feature/`, `chore/`, `dependabot/`, `hotfix/`, `release/`) +- [ ] No accidental commits (large files, secrets, personal configs) + +## Breaking Changes + + + +- [ ] This PR includes breaking changes +- [ ] Breaking changes are documented in the description above +- [ ] Migration path provided (if applicable) + +**Breaking Changes:** + + + +## Screenshots (if applicable) + + + +## Additional Notes + + + +## Reviewer Notes + + From 96462840475e6cb35aafde9ecd8bdb17c8c41011 Mon Sep 17 00:00:00 2001 From: mignot Date: Tue, 9 Dec 2025 14:49:11 +0100 Subject: [PATCH 4/7] docs(ci): align issue/discussion templates to Postgres Docker project - Update PR template to focus on Docker and Postgres - Update bug report and feature request issue templates to be Docker/Postgres specific - Update engineering feature template to replace API/Django references - Change Discussions templates to reference Bodzify DB Postgres - Update config.yml to point to Postgres repo's discussions --- .../DISCUSSIONS/discussion-body-template.md | 138 ++++++++++ .github/DISCUSSIONS/ideas.yml | 68 +++++ .github/DISCUSSIONS/q-and-a.yml | 61 +++++ .github/DISCUSSIONS/show-and-tell.yml | 58 ++++ .github/DISCUSSIONS/welcome-discussion.md | 90 +++++++ .github/ISSUE_TEMPLATE/bug_report.yml | 145 ++++++++++ .github/ISSUE_TEMPLATE/config.yml | 5 + .../ISSUE_TEMPLATE/engineering_feature.yml | 255 ++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.yml | 104 +++++++ .github/pull_request_template.md | 187 +++++++++---- 10 files changed, 1056 insertions(+), 55 deletions(-) create mode 100644 .github/DISCUSSIONS/discussion-body-template.md create mode 100644 .github/DISCUSSIONS/ideas.yml create mode 100644 .github/DISCUSSIONS/q-and-a.yml create mode 100644 .github/DISCUSSIONS/show-and-tell.yml create mode 100644 .github/DISCUSSIONS/welcome-discussion.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/engineering_feature.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml diff --git a/.github/DISCUSSIONS/discussion-body-template.md b/.github/DISCUSSIONS/discussion-body-template.md new file mode 100644 index 0000000..c3d9465 --- /dev/null +++ b/.github/DISCUSSIONS/discussion-body-template.md @@ -0,0 +1,138 @@ +# Discussion Body Template + +This is a template you can copy when creating new discussions. Choose the appropriate section based on your discussion type. + +--- + +## For Questions (Q&A) + +**Question:** +[Your question here] + +**Context:** + +- What are you trying to achieve? +- What have you already tried? +- What's your current setup? + +**Environment:** + +- Docker version: [e.g., 24.0.0] +- Postgres version: [e.g., 16.4] +- OS: [e.g., macOS, Linux, Windows] + +**Error Messages/Logs (if applicable):** + +``` +[Paste error messages or logs here] +``` + +**Additional Information:** +[Any other relevant details] + +--- + +## For Ideas + +**Idea:** +[Brief description of your idea] + +**Problem Statement:** +[What problem does this solve?] + +**Proposed Solution:** +[How would this work?] + +**Use Cases:** + +1. [Use case 1] +2. [Use case 2] +3. [Use case 3] + +**Alternatives Considered:** +[What other approaches did you consider?] + +**Priority:** +[ ] Nice to have +[ ] Would be helpful +[ ] Important +[ ] Critical + +**Additional Context:** +[Any mockups, examples, or additional information] + +--- + +## For Show & Tell + +**Project Name:** +[Name of your project/integration] + +**Description:** +[What you've built or how you're using Bodzify DB Postgres] + +**Key Features:** + +- Feature 1 +- Feature 2 +- Feature 3 + +**Screenshots/Demo:** +[Add images or links here] + +**Lessons Learned:** +[What did you learn? What worked well?] + +**Feedback:** +[Any feedback about the project or suggestions for improvement] + +**Links:** + +- Repository: [link] +- Demo: [link] +- Documentation: [link] + +--- + +## For General Discussion + +**Topic:** +[What you'd like to discuss] + +**Context:** +[Background information] + +**Discussion Points:** + +1. [Point 1] +2. [Point 2] +3. [Point 3] + +**Questions for the Community:** +[What would you like input on?] + +--- + +## Tips for Better Discussions + +1. **Use Clear Titles** - Make your title descriptive and specific +2. **Provide Context** - Include relevant background information +3. **Use Code Blocks** - Format code snippets properly +4. **Include Examples** - Show what you've tried or what you're looking for +5. **Be Patient** - Give the community time to respond +6. **Follow Up** - Update your discussion if you find a solution +7. **Mark as Answered** - Help others by marking helpful responses + +--- + +## Formatting Help + +- Use `backticks` for inline code +- Use triple backticks for code blocks: + ```python + # Your code here + ``` +- Use `-` or `*` for bullet points +- Use `##` for section headers +- Use `**bold**` for emphasis +- Use `[link text](url)` for links diff --git a/.github/DISCUSSIONS/ideas.yml b/.github/DISCUSSIONS/ideas.yml new file mode 100644 index 0000000..8d59edf --- /dev/null +++ b/.github/DISCUSSIONS/ideas.yml @@ -0,0 +1,68 @@ +title: "[Idea]: " +labels: ["enhancement"] +body: + - type: markdown + attributes: + value: | + Thanks for sharing your idea! This helps us understand what features would be valuable to the community. + + - type: textarea + id: idea-description + attributes: + label: Idea Description + description: Describe your idea in detail + placeholder: What would you like to see added or improved? + validations: + required: true + + - type: textarea + id: problem + attributes: + label: Problem Statement + description: What problem does this idea solve? + placeholder: This would help with... + validations: + required: true + + - type: textarea + id: use-cases + attributes: + label: Use Cases + description: Describe specific scenarios where this would be useful + placeholder: | + 1. Use case 1: ... + 2. Use case 2: ... + validations: + required: false + + - type: textarea + id: alternatives + attributes: + label: Alternatives Considered + description: Have you considered any alternative approaches? + placeholder: I also thought about... + validations: + required: false + + - type: dropdown + id: priority + attributes: + label: Priority + description: How important is this to you? + options: + - Nice to have + - Would be helpful + - Important + - Critical + validations: + required: false + + - type: textarea + id: additional-context + attributes: + label: Additional Context + description: Any other context, mockups, or examples + placeholder: Add any other context here... + validations: + required: false + diff --git a/.github/DISCUSSIONS/q-and-a.yml b/.github/DISCUSSIONS/q-and-a.yml new file mode 100644 index 0000000..e07a912 --- /dev/null +++ b/.github/DISCUSSIONS/q-and-a.yml @@ -0,0 +1,61 @@ +title: "[Q&A]: " +labels: ["question"] +body: + - type: markdown + attributes: + value: | + Ask your question here! The community and maintainers are here to help. + + - type: textarea + id: question + attributes: + label: Question + description: What would you like to know? + placeholder: Your question here... + validations: + required: true + + - type: textarea + id: context + attributes: + label: Context + description: Provide context about what you're trying to achieve + placeholder: | + I'm trying to... + I've already tried... + I'm using... + validations: + required: false + + - type: textarea + id: environment + attributes: + label: Environment (if applicable) + description: Provide environment details (Docker, Postgres, OS, etc.) + placeholder: | + - Docker version: 24.0.0 + - Postgres version: 16.4 + - OS: macOS / Linux + - Image tag: `bodzify-db-postgres:latest` + validations: + required: false + + - type: textarea + id: error-messages + attributes: + label: Error Messages or Logs (if applicable) + description: Paste any error messages or relevant logs + placeholder: Paste error messages here... + validations: + required: false + + - type: checkboxes + id: searched + attributes: + label: I have searched existing discussions and issues + description: Please confirm you've checked for similar questions + options: + - label: I have searched existing discussions + required: true + - label: I have searched existing issues + required: true diff --git a/.github/DISCUSSIONS/show-and-tell.yml b/.github/DISCUSSIONS/show-and-tell.yml new file mode 100644 index 0000000..194e7ed --- /dev/null +++ b/.github/DISCUSSIONS/show-and-tell.yml @@ -0,0 +1,58 @@ +title: "[Show & Tell]: " +labels: [] +body: + - type: markdown + attributes: + value: | + Share your project, integration, or experience with Bodzify DB Postgres! We'd love to see what you've built. + + - type: textarea + id: project-description + attributes: + label: Project Description + description: Tell us about your project or integration + placeholder: Describe what you've built or how you're using Bodzify DB Postgres... + validations: + required: true + + - type: textarea + id: features + attributes: + label: Key Features + description: What are the main features or highlights? + placeholder: | + - Feature 1 + - Feature 2 + - Feature 3 + validations: + required: false + + - type: textarea + id: screenshots + attributes: + label: Screenshots or Links + description: Share screenshots, demo links, or repository links + placeholder: | + Screenshot: [image] + Demo: [link] + Repository: [link] + validations: + required: false + + - type: textarea + id: lessons-learned + attributes: + label: Lessons Learned + description: Any tips, tricks, or insights you'd like to share? + placeholder: Share what you learned or what might help others... + validations: + required: false + + - type: textarea + id: feedback + attributes: + label: Feedback + description: Any feedback about the project or suggestions for improvement? + placeholder: What worked well? What could be improved? + validations: + required: false diff --git a/.github/DISCUSSIONS/welcome-discussion.md b/.github/DISCUSSIONS/welcome-discussion.md new file mode 100644 index 0000000..de22788 --- /dev/null +++ b/.github/DISCUSSIONS/welcome-discussion.md @@ -0,0 +1,90 @@ +# Welcome to Bodzify DB Postgres Discussions! 🐘 + +Welcome to the Bodzify DB Postgres community discussions! This is the place to ask questions, share ideas, discuss the Dockerized Postgres image, and connect with other users and contributors. + +## What are Discussions? + +Discussions are a great place for: + +- πŸ’¬ **Questions & Answers** - Get help with implementation, configuration, or usage +- πŸ’‘ **Ideas & Suggestions** - Share feature ideas and brainstorm improvements +- 🎨 **Show & Tell** - Showcase your projects, integrations, or experiences +- πŸ“’ **Announcements** - Important updates from maintainers +- 🎡 **Music & Genres** - Discuss music organization, genres, and playlists + +## Discussion Categories + +We have several categories to help organize conversations: + +### πŸ“‹ General (Q&A) + +Ask questions and get answers about using Bodzify DB Postgres. Whether you're troubleshooting builds, configuration, or connectivity, this is the place to ask! + +### πŸ’‘ Ideas + +Share your ideas and suggestions for new features or improvements. This is perfect for brainstorming and gathering community feedback before creating a formal feature request. + +### 🎨 Show and Tell + +Share your projects, integrations, or experiences with Bodzify DB Postgres! We'd love to see what you've built and learn from your experiences. + +### πŸ“’ Announcements + +Important announcements and updates from maintainers. This includes release announcements, breaking changes, and other important news. + +### 🐳 Docker & Database + +Discuss Docker usage, configuration, backup/restore, backups, replication, and other database operations related to this project. + +## Before You Post + +1. **Search First** - Check if your question or idea has already been discussed +2. **Use Templates** - When creating a new discussion, use the provided templates to structure your post +3. **Be Respectful** - Follow our [Code of Conduct](CODE_OF_CONDUCT.md) +4. **Provide Context** - Include relevant details, code examples, or error messages when asking questions +5. **Mark as Answered** - If your question gets resolved, mark the answer as "Answered" + +## Discussion vs Issue? + +**Use Discussions for:** + +- Questions and help requests +- Feature brainstorming and ideas +- General conversations +- Sharing experiences +- Non-urgent suggestions + +**Use Issues for:** + +- Bug reports (use [Bug Report template](.github/ISSUE_TEMPLATE/bug_report.yml)) +- Feature requests (use [Feature Request template](.github/ISSUE_TEMPLATE/feature_request.yml)) +- Actionable items that need tracking + +## Getting Started + +1. **New to the project?** Check out our [README](README.md) for setup and usage instructions +2. **Want to contribute?** Read our [Contributing Guidelines](CONTRIBUTING.md) +3. **Have a question?** Use the Q&A template to ask +4. **Have an idea?** Use the Ideas template to share + +## Community Guidelines + +- Be respectful and inclusive +- Provide helpful, constructive feedback +- Search before posting +- Use clear, descriptive titles +- Follow the [Code of Conduct](CODE_OF_CONDUCT.md) + +## Resources + +- πŸ“– [Documentation](README.md) +- 🀝 [Contributing Guide](CONTRIBUTING.md) + -- πŸ“ [Issue Templates](.github/ISSUE_TEMPLATE/) +- πŸ“œ [Code of Conduct](CODE_OF_CONDUCT.md) +- πŸ“„ [License](LICENSE) + +--- + +**Let's make Bodzify DB Postgres grow together! 🌱** + +Feel free to introduce yourself, ask questions, or share your thoughts. We're here to help and learn from each other! diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..68cff6d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,145 @@ +name: Bug Report +description: Report a bug or unexpected behavior in the Docker image, startup scripts, or runtime behavior +title: "[Bug]: " +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + Thanks for reporting a bug! Please fill out the sections below to help us understand and fix the issue. + + - type: dropdown + id: component + attributes: + label: Component + description: Which part of the project is affected? + options: + - Dockerfile / Build + - Entrypoint / Startup Script + - Configuration / Environment Variables + - Container runtime / Networking + - Volumes / Persistence + - Backups / Restore + - Replication / High Availability + - Security / Credentials + - Logging / Monitoring + - CI / Tests + - Documentation + - Other + validations: + required: true + + - type: textarea + id: description + attributes: + label: Description + description: A clear and concise description of the bug + placeholder: Describe what the bug is... + validations: + required: true + + - type: textarea + id: steps-to-reproduce + attributes: + label: Steps to Reproduce + description: Steps to reproduce the behavior + placeholder: | + 1. Build the image: `docker build -t bodzify-db:pr .` + 2. Run container: `docker run --rm -d --name bodzify-db-pr -e POSTGRES_PASSWORD=test -p 5432:5432 bodzify-db:pr` + 3. Run a command against the container or observe startup logs + 4. See error / unexpected behavior in logs or container state + validations: + required: true + + - type: textarea + id: expected-behavior + attributes: + label: Expected Behavior + description: What you expected to happen + placeholder: Describe what should have happened... + validations: + required: true + + - type: textarea + id: actual-behavior + attributes: + label: Actual Behavior + description: What actually happened + placeholder: Describe what actually happened... + validations: + required: true + + - type: textarea + id: error-response + attributes: + label: Error Response (if applicable) + description: Paste container logs or error messages (e.g., output of `docker logs` or Postgres error messages). Remove sensitive data. + placeholder: | + Status Code: 400 + { + "code": 2001, + "message": "Validation error", + "details": { ... } + } + validations: + required: false + + - type: textarea + id: request-details + attributes: + label: Request Details + description: Include request method, endpoint, headers, and payload (remove sensitive data) + placeholder: | + Docker Build Command: `docker build -t bodzify-db:pr .` + Docker Run Command: `docker run --rm -d --name bodzify-db-pr -e POSTGRES_PASSWORD=test -p 5432:5432 bodzify-db:pr` + Host: macOS / Linux / Windows + Image Tag: `bodzify-db:pr` or `postgres:16.4` + Relevant Env Vars: `POSTGRES_PASSWORD`, `POSTGRES_DB`, `POSTGRES_USER` + validations: + required: false + + - type: dropdown + id: severity + attributes: + label: Severity + description: How severe is this bug? + options: + - Critical (database is down or data loss) + - High (Major feature broken) + - Medium (Feature partially broken) + - Low (Minor issue, workaround exists) + validations: + required: true + + - type: textarea + id: environment + attributes: + label: Environment + description: Environment details + placeholder: | + - Docker version: 24.0.0 + - OS / Host Architecture: macOS/Intel / macOS/Apple Silicon / Linux x86_64 + - Image tag: `bodzify-db:pr` or `bodzify-db-postgres:latest` + - Container runtime: Docker, Podman, etc. + - Postgres version: 16.4 + - CI environment (if applicable) + validations: + required: false + + - type: textarea + id: logs + attributes: + label: Relevant Logs + description: Paste any relevant logs or stack traces (remove sensitive data) + placeholder: Paste logs here... + validations: + required: false + + - type: textarea + id: additional-context + attributes: + label: Additional Context + description: Any other context, screenshots, or information about the problem + placeholder: Add any other context about the problem here... + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..90f18e6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: πŸ’¬ Discussions + url: https://github.com/BehindTheMusicTree/bodzify-db-postgres/discussions + about: Ask questions, share ideas, or discuss the Bodzify DB Postgres project diff --git a/.github/ISSUE_TEMPLATE/engineering_feature.yml b/.github/ISSUE_TEMPLATE/engineering_feature.yml new file mode 100644 index 0000000..b8b8858 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/engineering_feature.yml @@ -0,0 +1,255 @@ +name: Engineering Feature +description: Detailed technical feature for internal development planning +title: "[Engineering]: " +labels: ["enhancement", "engineering", "internal"] +body: + - type: markdown + attributes: + value: | + ## Engineering Feature Template + This template is for detailed technical features requiring comprehensive planning and implementation. + + - type: dropdown + id: component + attributes: + label: Component + description: Which part of the project would this feature affect? + options: + - Dockerfile / Build + - Entrypoint / Init scripts + - Startup / Healthchecks + - Configuration / Environment variables + - Volumes / Persistence / Backups + - Replication / HA + - Security / Credentials + - CI / Tests / Deployment + - Performance / Tuning + - Monitoring / Logging + - Documentation + - Tooling / Scripts + - Other + validations: + required: true + + - type: dropdown + id: priority + attributes: + label: Priority + description: How urgent is this feature? + options: + - Critical (Blocking production/upgrade) + - High (Required for upcoming release) + - Medium (Planned enhancement) + - Low (Nice to have) + validations: + required: true + + - type: textarea + id: overview + attributes: + label: Overview + description: High-level summary of what this feature aims to achieve + placeholder: Brief description of the feature and its purpose + validations: + required: true + + - type: textarea + id: background + attributes: + label: Background & Context + description: Why is this feature needed? What problem does it solve? + placeholder: | + - Current situation + - Problem statement + - Business/technical drivers + validations: + required: true + + - type: textarea + id: current-state + attributes: + label: Current State + description: Describe the current implementation and any issues (e.g., startup issues, volume handling) + placeholder: | + - Current behavior + - Known limitations + - Related Dockerfile location or scripts + validations: + required: false + + - type: textarea + id: proposed-changes + attributes: + label: Proposed Changes + description: Detailed description of the technical changes required (build, scripts, configs) + placeholder: | + ### Changes Required + - Change 1: Description + - Change 2: Description + + ### Files to Modify + - `path/to/file1.py` - What needs to change + - `path/to/file2.py` - What needs to change + + ### DB / Interface Changes (if applicable) + - Schema or data format changes + - Startup/connection changes + - Breaking changes (config or data format) + validations: + required: true + + - type: textarea + id: implementation-plan + attributes: + label: Implementation Plan + description: Step-by-step plan for implementing this feature + placeholder: | + - [ ] Step 1: Task description + - [ ] Step 2: Task description + - [ ] Step 3: Task description + - [ ] Step 4: Testing and validation + - [ ] Step 5: Documentation updates + validations: + required: true + + - type: textarea + id: migration-strategy + attributes: + label: Migration Strategy (if applicable) + description: Data migration, schema compatibility, or deployment considerations for the database image + placeholder: | + - Database schema changes + - Data migration requirements + - Backward compatibility approach + - Rollback strategy + validations: + required: false + + - type: textarea + id: testing-strategy + attributes: + label: Testing Strategy + description: How will this feature be tested? (unit tests, integration tests, CI builds, smoke tests) + placeholder: | + - Unit tests to add/modify + - Integration tests needed + - Manual testing checklist + - Performance testing requirements + - Expected test coverage + validations: + required: true + + - type: textarea + id: success-criteria + attributes: + label: Success Criteria / Definition of Done + description: Measurable outcomes that define completion + placeholder: | + - [ ] All unit tests pass + - [ ] No deprecation warnings + - [ ] Documentation updated + - [ ] Code review approved + - [ ] Deployed to staging + validations: + required: true + + - type: textarea + id: risks + attributes: + label: Risks & Mitigation + description: Potential risks and how to address them + placeholder: | + **Risk 1:** Description + **Mitigation:** Strategy + + **Risk 2:** Description + **Mitigation:** Strategy + validations: + required: false + + - type: dropdown + id: breaking-changes + attributes: + label: Breaking Changes + description: Does this introduce breaking changes? + options: + - "No breaking changes" + - "Yes - Configuration / Env var changes" + - "Yes - Data or schema changes" + - "Yes - Image/runtime changes (start-up, command, entrypoint)" + - "Yes - Multiple breaking changes" + validations: + required: true + + - type: textarea + id: timeline + attributes: + label: Timeline Estimate + description: Estimated time to complete this feature + placeholder: | + - Planning & Design: X hours + - Implementation: X hours + - Testing: X hours + - Code Review & Deployment: X hours + - **Total:** X hours / X days + validations: + required: false + + - type: textarea + id: dependencies + attributes: + label: Dependencies + description: Other features, issues, or external dependencies + placeholder: | + - Depends on #123 + - Blocked by #456 + - Related to #789 + - Requires library upgrade: package==version + validations: + required: false + + - type: textarea + id: alternatives + attributes: + label: Alternatives Considered + description: Other approaches that were evaluated + placeholder: | + **Alternative 1:** Description + **Pros:** ... + **Cons:** ... + **Decision:** Why not chosen + validations: + required: false + + - type: textarea + id: references + attributes: + label: References + description: Links to documentation, RFCs, related discussions, or Dockerfiles for reference + placeholder: | + - [PostgreSQL Documentation](https://www.postgresql.org/docs/) + - [Dockerfile best practices](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/) + - [Trivy Security Scan](https://github.com/aquasecurity/trivy) + validations: + required: false + + - type: checkboxes + id: approval + attributes: + label: Approval Required + description: Which stakeholders need to approve this feature? + options: + - label: Technical Lead approval + - label: QA sign-off on testing plan + - label: DevOps review (for infrastructure changes) + - label: Product Owner awareness + - label: Security review (for security-related changes) + + - type: textarea + id: additional-context + attributes: + label: Additional Context + description: Any other relevant information, diagrams, or code examples + placeholder: Add diagrams, code snippets, screenshots, or other context here... + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..060f820 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,104 @@ +name: Feature Request +description: Suggest a new feature or enhancement for the Docker image or tooling +title: "[Feature]: " +labels: ["enhancement", "feature"] +body: + - type: markdown + attributes: + value: | + Thanks for suggesting a feature! Please fill out the sections below to help us understand your request. + + - type: dropdown + id: component + attributes: + label: Component + description: Which part of the project would this feature affect? + options: + - Dockerfile / Build + - Entrypoint / Startup Script + - Environment Variables / Config + - Persistence / Volumes + - Backup & Restore + - Replication / Clustering + - Security / Credentials + - CI / Tests + - Documentation + - Monitoring / Logging + - Tooling & Scripts + - Documentation + - Other + - Other + validations: + required: true + + - type: textarea + id: problem + attributes: + label: Problem Statement + description: Is your feature request related to a problem? Describe it clearly + placeholder: I'm always frustrated when... + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Proposed Solution + description: Describe the solution you'd like to see + placeholder: I would like to see... + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Alternatives Considered + description: Describe any alternative solutions or features you've considered + placeholder: I also considered... + validations: + required: false + + - type: textarea + id: implementation + attributes: + label: Implementation Details + description: Describe how the feature should be implemented (build changes, scripts, and impact) + placeholder: | + - Update Dockerfile to include XYZ + - Add startup script to check config + - Provide migration or backup scripts (if applicable) + validations: + required: false + + - type: dropdown + id: priority + attributes: + label: Priority + description: How important is this feature to you? + options: + - Critical (Blocking my work) + - High (Would significantly improve my workflow) + - Medium (Nice to have) + - Low (Minor improvement) + validations: + required: true + + - type: textarea + id: use-cases + attributes: + label: Use Cases + description: Describe specific use cases or scenarios where this feature would be helpful + placeholder: | + 1. Use case 1: ... + 2. Use case 2: ... + validations: + required: false + + - type: textarea + id: additional-context + attributes: + label: Additional Context + description: Any other context, mockups, or examples about the feature request + placeholder: Add any other context, screenshots, or examples here... + validations: + required: false diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f7bc54d..8754cca 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,22 +1,21 @@ -````markdown ## Summary - + ## Description - + ## Related Issue - + ## Type of change - [ ] πŸ› Bug fix (non-breaking change) - [ ] πŸ“¦ Docker image change (base image, packages, startup) - [ ] πŸ”§ Configuration change (env vars, scripts, defaults) -- [ ] πŸ› οΈ Build/CI change +- [ ] πŸ› οΈ CI / build change - [ ] πŸ“š Documentation update - [ ] ♻️ Refactor / maintenance - [ ] βœ… Tests added/updated @@ -29,7 +28,7 @@ ## Changes made - + ## Testing @@ -38,24 +37,27 @@ ### Recommended local checks ```bash -# Build image +# Build the image locally docker build -t bodzify-db-postgres:pr . -# Run container (example) +# Run the container for a quick smoke test docker run --rm -d --name bodzify-db-pr -e POSTGRES_PASSWORD=test -p 5432:5432 bodzify-db-postgres:pr -# Quick smoke test (ensure psql is installed locally or run in a container) +# Check container logs +docker logs -f bodzify-db-pr + +# Verify Postgres is reachable (from host or another container) docker run --rm --network host postgres:16.4 psql -h localhost -U postgres -c '\l' -# Tear down example +# Teardown docker stop bodzify-db-pr || true ``` ### Optional checks -- Dockerfile linting (hadolint) -- Security scanning (Trivy/Clair), if applicable -- Validate that startup scripts run without errors +- Dockerfile linting: `hadolint Dockerfile` +- Security scan: `trivy image --severity HIGH,CRITICAL bodzify-db-postgres:pr` +- Validate startup scripts and healthchecks ## Checklist @@ -63,11 +65,11 @@ docker stop bodzify-db-pr || true - [ ] CHANGELOG updated (if applicable) - [ ] Dockerfile and build steps validated - [ ] Environment variables documented and safe defaults set -- [ ] No secrets committed in code or Dockerfile -- [ ] CI workflow updated if needed to test the build and run steps +- [ ] No secrets checked into code or Dockerfile +- [ ] CI builds / checks updated to verify image builds and runs - [ ] Tests added/updated (if applicable) -## Breaking changes +## Breaking Changes @@ -76,7 +78,7 @@ docker stop bodzify-db-pr || true ## Screenshots / Logs (if applicable) - + ## Additional Notes @@ -84,58 +86,136 @@ docker stop bodzify-db-pr || true ## Reviewer Notes - -```` + + +````markdown +## Summary + + ## Description - - + ## Related Issue - - + -## Type of Change - - +## Type of change -- [ ] πŸ› Bug fix (non-breaking change which fixes an issue) -- [ ] ✨ New feature (non-breaking change which adds functionality) -- [ ] πŸ’₯ Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] πŸ› Bug fix (non-breaking change) +- [ ] πŸ“¦ Docker image change (base image, packages, startup) +- [ ] πŸ”§ Configuration change (env vars, scripts, defaults) +- [ ] πŸ› οΈ CI / build change - [ ] πŸ“š Documentation update -- [ ] ♻️ Refactoring (no functional changes) -- [ ] ⚑ Performance improvement -- [ ] βœ… Test addition/update -- [ ] πŸ”§ Configuration change -- [ ] 🎨 Style/formatting changes -- [ ] 🧹 Chore/maintenance - -## Target Branch +- [ ] ♻️ Refactor / maintenance +- [ ] βœ… Tests added/updated +- [ ] ⚠️ Breaking change - +## Target branch -- [ ] `develop` (for features, bug fixes, chores, dependency updates from Dependabot) -- [ ] `main` (for hotfixes only) +- [ ] `main` (hotfixes only) +- [ ] `develop` (features, fixes, and routine work) -## Changes Made +## Changes made - + ## Testing - + + +### Recommended local checks + +```bash +# Build the image locally +docker build -t bodzify-db-postgres:pr . + +# Run the container for a quick smoke test +docker run --rm -d --name bodzify-db-pr -e POSTGRES_PASSWORD=test -p 5432:5432 bodzify-db-postgres:pr + +# Check container logs +docker logs -f bodzify-db-pr + +# Verify Postgres is reachable (from host or another container) +docker run --rm --network host postgres:16.4 psql -h localhost -U postgres -c '\l' + +# Teardown +docker stop bodzify-db-pr || true +``` + +### Optional checks + +- Dockerfile linting: `hadolint Dockerfile` +- Security scan: `trivy image --severity HIGH,CRITICAL bodzify-db-postgres:pr` +- Validate startup scripts and healthchecks + +## Checklist + +- [ ] README updated (installation, environment variables, examples) +- [ ] CHANGELOG updated (if applicable) +- [ ] Dockerfile and build steps validated +- [ ] Environment variables documented and safe defaults set +- [ ] No secrets checked into code or Dockerfile +- [ ] CI builds / checks updated to verify image builds and runs +- [ ] Tests added/updated (if applicable) + +## Breaking Changes + + + +- [ ] This PR includes breaking changes +- [ ] Migration steps included / documented + +## Screenshots / Logs (if applicable) + + + +## Additional Notes + + + +## Reviewer Notes + + +```` + +```markdown +## Summary + + + +## Description + + + +## Related Issue + + + +## Type of change +``` - [ ] All existing tests pass - [ ] New tests added (if applicable) - [ ] Manual testing completed (if applicable) -**Test commands:** +**Test commands / quick verification:** ```bash -# Add test commands here -pytest +# Build image +docker build -t bodzify-db-postgres:pr . + +# Run for smoke test +docker run --rm -d --name bodzify-db-pr -e POSTGRES_PASSWORD=test -p 5432:5432 bodzify-db-postgres:pr + +# Check logs +docker logs -f bodzify-db-pr + +# Optional: run psql query from another container +docker run --rm --network host postgres:16.4 psql -h localhost -U postgres -c '\l' + +docker stop bodzify-db-pr || true ``` ## Checklist @@ -145,19 +225,16 @@ pytest ### Code Quality - [ ] Code follows project style guidelines ([code-style.md](code-style.md)) -- [ ] Code follows Django best practices -- [ ] Type hints added where appropriate +- [ ] Dockerfile follows best practices (small base image, no secrets, multi-stage if needed) +- [ ] Entrypoint/startup scripts follow conventions and are idempotent - [ ] No debug statements or commented-out code -- [ ] One class per file (if applicable) -- [ ] Field name constants used (if applicable) +- [ ] Linting/formatting checks pass ### Tests -- [ ] All tests pass: `pytest` -- [ ] New features have corresponding tests -- [ ] Bug fixes include regression tests -- [ ] Tests follow naming convention: `test_{scenario}_then_{expected_result}` -- [ ] Each test focuses on a single scenario +- [ ] All CI / test checks pass +- [ ] New features have corresponding tests (if applicable) +- [ ] Bug fixes include regression tests (if applicable) ### Documentation From 1e427b70de7d4d22b87f86fece76f6bb976f1e59 Mon Sep 17 00:00:00 2001 From: mignot Date: Tue, 9 Dec 2025 15:15:11 +0100 Subject: [PATCH 5/7] chore(docs): add PR template to pr_descriptions, update .gitignore, remove root PR template --- .cursor/rules/changelog-best-practices.mdc | 156 ++++++++++++++++++ .github/FUNDING.yml | 15 ++ .../pull_request_template.md | 0 .gitignore | 2 + CHANGELOG.md | 61 +++++++ 5 files changed, 234 insertions(+) create mode 100644 .cursor/rules/changelog-best-practices.mdc create mode 100644 .github/FUNDING.yml rename .github/{ => pr_descriptions}/pull_request_template.md (100%) create mode 100644 .gitignore create mode 100644 CHANGELOG.md diff --git a/.cursor/rules/changelog-best-practices.mdc b/.cursor/rules/changelog-best-practices.mdc new file mode 100644 index 0000000..d7785f0 --- /dev/null +++ b/.cursor/rules/changelog-best-practices.mdc @@ -0,0 +1,156 @@ +--- +description: +globs: +alwaysApply: true +--- +# Changelog Best Practices + +All contributors must update `CHANGELOG.md` when creating PRs. Follow these guidelines to ensure consistent and useful changelog entries. + +## General Principles + +- Changelogs are for humans, not machines +- Include an entry for every version, with the latest first +- Group similar changes under appropriate categories: Added, Changed, Improved, Deprecated, Removed, Fixed, Documentation, Performance, CI +- **"Test" is NOT a valid changelog category** - tests should be mentioned within the related feature or fix entry, not as standalone entries +- Use an "Unreleased" section for upcoming changes +- Follow Semantic Versioning where possible +- Use ISO 8601 date format: YYYY-MM-DD +- Avoid dumping raw git logs; summarize notable changes clearly + +## Required Actions + +1. **Add entries to the `[Unreleased]` section** - Add your changes under the appropriate category +2. **Follow the changelog format** - See examples in `CHANGELOG.md` for detailed guidelines +3. **Group related changes** - Similar changes should be grouped together +4. **Be descriptive** - Write clear, user-focused descriptions of what changed +5. **Mention tests when relevant** - Tests should be mentioned within the related feature or fix entry, not as standalone entries + +## Categories + +### Added +- New features, endpoints, functionality +- New dependencies or integrations +- New configuration options + +### Changed +- Changes to existing functionality +- API changes (non-breaking) +- Dependency updates +- Configuration changes + +### Fixed +- Bug fixes +- Security fixes +- Error handling improvements + +### Documentation +- Documentation additions or updates +- README changes +- Contributing guide updates +- Code comments and docstrings (only if significant) + +### Performance +- Performance improvements +- Optimization changes +- Caching improvements + +### CI +- CI/CD pipeline changes +- GitHub Actions workflow updates +- Automation improvements +- Branch protection rules + +### Deprecated +- Features marked for removal +- Deprecated API endpoints + +### Removed +- Removed features or functionality +- Removed dependencies + +## Format Guidelines + +### Entry Structure + +```markdown +- **Component/Feature Name**: Brief description of the change + - Additional details or sub-features + - Test coverage information (if relevant) +``` + +### Examples + +**Good Examples:** + +```markdown +### Added + +- **Track API**: Added batch upload endpoint for multiple tracks + - Includes comprehensive unit tests covering various file formats and error scenarios + - Supports parallel upload processing for improved performance + +### Fixed + +- **Track Upload**: Fixed issue with handling large audio files exceeding size limits + - Includes regression tests to prevent future occurrences + - Improved error messages for better user feedback + +### Documentation + +- **Contributing Guide**: Added comprehensive Git Flow workflow documentation + - Includes branch naming conventions and merging rules + - Added pre-PR checklist and review process guidelines + +### CI + +- **Branch Protection**: Added automated enforcement of Git Flow branching rules + - Blocks invalid PRs to main and develop branches +``` + +**Bad Examples:** + +```markdown +# Bad - Too vague +- Fixed bug + +# Bad - Test as standalone entry +### Test +- Added tests for track upload + +# Bad - Raw git log style +- commit abc123: update dependencies + +# Bad - Wrong category +### Added +- Updated README.md (should be Documentation) +``` + +## Documentation Entries + +Documentation changes should be grouped under the **Documentation** category, not under Added or Changed. This includes: + +- README updates +- Contributing guide changes +- Development guidelines +- API documentation +- Code comments (only if significant additions) +- Documentation infrastructure setup + +## Release Process + +During releases, maintainers will: +1. Move entries from `[Unreleased]` to a versioned section (e.g., `## [v0.2.8] - 2025-01-15`) +2. Review and consolidate related entries +3. Ensure all entries follow the format guidelines +4. Update version numbers and dates + +## Checklist + +Before submitting a PR, ensure: +- βœ… All changes are documented in `CHANGELOG.md` under `[Unreleased]` +- βœ… Entries are in the correct category +- βœ… Entries follow the format guidelines +- βœ… Tests are mentioned within related entries (not as standalone entries) +- βœ… Documentation changes are in the Documentation category +- βœ… Entries are clear and user-focused diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..93700df --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,15 @@ +# These are supported funding model platforms + +github: Andreas-Garcia # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry +polar: # Replace with a single Polar username +buy_me_a_coffee: # Replace with a single Buy Me a Coffee username +thanks_dev: # Replace with a single thanks.dev username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/pull_request_template.md b/.github/pr_descriptions/pull_request_template.md similarity index 100% rename from .github/pull_request_template.md rename to .github/pr_descriptions/pull_request_template.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..db847ee --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.github/pr_descriptions/* +!.github/pr_descriptions/pull_request_template.md \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..fd21def --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,61 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## Changelog Best Practices + +### General Principles + +- Changelogs are for humans, not machines. +- Include an entry for every version, with the latest first. +- Group similar changes under: Added, Changed, Improved, Deprecated, Removed, Fixed, Documentation, Performance, CI. +- Use an "Unreleased" section for upcoming changes. +- Follow Semantic Versioning where possible. +- Use ISO 8601 date format: YYYY-MM-DD. +- Avoid dumping raw git logs; summarize notable changes clearly. + +### Guidelines for Contributors + +All contributors (including maintainers) should update `CHANGELOG.md` when creating PRs: + +1. **Add entries to the `[Unreleased]` section** - Add your changes under the appropriate category (Added, Changed, Improved, Deprecated, Removed, Fixed, Documentation, Performance, CI) +2. **Follow the changelog format** - See examples below and `.cursor/rules/changelog-best-practices.mdc` for detailed guidelines +3. **Group related changes** - Similar changes should be grouped together +4. **Be descriptive** - Write clear, user-focused descriptions of what changed +5. **Mention tests when relevant** - Tests should be mentioned within the related feature or fix entry, not as standalone entries + +**Example:** + +```markdown +## [Unreleased] + +### Added + +- **Remote Access Configuration**: Added automatic PostgreSQL configuration for remote connections + - Enables SCRAM-SHA-256 authentication for all users and databases + - Includes automatic configuration reload after setup + +### Fixed + +- **Docker Build Process**: Fixed dependency installation script execution order + - Corrected script naming inconsistencies in Dockerfile + +### Documentation + +- **README**: Added comprehensive project documentation with build and run instructions +``` + +**Note:** During releases, maintainers will move entries from `[Unreleased]` to a versioned section (e.g., `## [0.2.8] - 2025-01-XX`). + +## [Unreleased] + +### Documentation + +- **README**: Added comprehensive README with project description, features, prerequisites, build and run instructions, configuration details, and table of contents + - Includes Docker usage examples with environment variables and port configuration + - Documents the custom PostgreSQL configuration for remote access with SCRAM-SHA-256 authentication + - Added table of contents for better navigation + /Users/mignot/git/bodzify-db-postgres/CHANGELOG.md From d1d1cf25283fa82c651cef0645dbf1f501e2f681 Mon Sep 17 00:00:00 2001 From: mignot Date: Tue, 9 Dec 2025 15:21:39 +0100 Subject: [PATCH 6/7] docs(pr): add branch PR description and track it in .gitignore --- .../pr_descriptions/chore_improve_docs_pr.md | 31 +++++++++++++++++++ .gitignore | 3 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/pr_descriptions/chore_improve_docs_pr.md diff --git a/.github/pr_descriptions/chore_improve_docs_pr.md b/.github/pr_descriptions/chore_improve_docs_pr.md new file mode 100644 index 0000000..9144a2d --- /dev/null +++ b/.github/pr_descriptions/chore_improve_docs_pr.md @@ -0,0 +1,31 @@ +Title: chore(docs): align GitHub templates, labeler & issue templates to Postgres Docker project + +Summary + +- Align GitHub metadata and templates to Bodzify DB Postgres (post-API split) +- Replace API/Django specific templates and labels with Docker / Postgres focused ones +- Add a local PR template library in `.github/pr_descriptions/` and documentation for maintainers + +Changes + +- Updated `.github/labeler.yml` to remove API component labels and add repo-specific label patterns +- Added and updated PR/Issue/Discussion templates under `.github/ISSUE_TEMPLATE/` and `.github/DISCUSSIONS/` +- Moved the canonical PR template to `.github/pr_descriptions/` and added a README explaining usage +- Updated `.gitignore` to keep the template files tracked while ignoring other drafts + +Testing & verification + +- Validate YAML files: `yamllint .github/labeler.yml` and `yamllint .github/ISSUE_TEMPLATE/*.yml` +- Build and smoke test Docker image: `docker build -t bodzify-db-postgres:pr .` and run a simple Postgres check +- Open a small test PR to confirm labeler rules apply correctly + +Checklist + +- [ ] README/CHANGELOG updated (if needed) +- [ ] Label rules applied as expected on a test PR +- [ ] No secrets added +- [ ] CI updated to lint and run a smoke test for the Docker image + +Notes + +- Keeping the template in `pr_descriptions` is intentional: it stores canonical templates while letting contributors keep local drafts in the same folder (but ignored). If you'd like this template to appear in GitHub’s template UI, move it to `.github/pull_request_template.md` or `.github/PULL_REQUEST_TEMPLATE/`. diff --git a/.gitignore b/.gitignore index db847ee..09e9925 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .github/pr_descriptions/* -!.github/pr_descriptions/pull_request_template.md \ No newline at end of file +!.github/pr_descriptions/pull_request_template.md +!.github/pr_descriptions/chore_improve_docs_pr.md \ No newline at end of file From e0e1a8c725d6fc1275ee3d87b9f2c52db7ba4569 Mon Sep 17 00:00:00 2001 From: mignot Date: Tue, 9 Dec 2025 15:26:59 +0100 Subject: [PATCH 7/7] chore: stop tracking branch PR description (ignore it) --- .../pr_descriptions/chore_improve_docs_pr.md | 31 ------------------- .gitignore | 3 +- 2 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 .github/pr_descriptions/chore_improve_docs_pr.md diff --git a/.github/pr_descriptions/chore_improve_docs_pr.md b/.github/pr_descriptions/chore_improve_docs_pr.md deleted file mode 100644 index 9144a2d..0000000 --- a/.github/pr_descriptions/chore_improve_docs_pr.md +++ /dev/null @@ -1,31 +0,0 @@ -Title: chore(docs): align GitHub templates, labeler & issue templates to Postgres Docker project - -Summary - -- Align GitHub metadata and templates to Bodzify DB Postgres (post-API split) -- Replace API/Django specific templates and labels with Docker / Postgres focused ones -- Add a local PR template library in `.github/pr_descriptions/` and documentation for maintainers - -Changes - -- Updated `.github/labeler.yml` to remove API component labels and add repo-specific label patterns -- Added and updated PR/Issue/Discussion templates under `.github/ISSUE_TEMPLATE/` and `.github/DISCUSSIONS/` -- Moved the canonical PR template to `.github/pr_descriptions/` and added a README explaining usage -- Updated `.gitignore` to keep the template files tracked while ignoring other drafts - -Testing & verification - -- Validate YAML files: `yamllint .github/labeler.yml` and `yamllint .github/ISSUE_TEMPLATE/*.yml` -- Build and smoke test Docker image: `docker build -t bodzify-db-postgres:pr .` and run a simple Postgres check -- Open a small test PR to confirm labeler rules apply correctly - -Checklist - -- [ ] README/CHANGELOG updated (if needed) -- [ ] Label rules applied as expected on a test PR -- [ ] No secrets added -- [ ] CI updated to lint and run a smoke test for the Docker image - -Notes - -- Keeping the template in `pr_descriptions` is intentional: it stores canonical templates while letting contributors keep local drafts in the same folder (but ignored). If you'd like this template to appear in GitHub’s template UI, move it to `.github/pull_request_template.md` or `.github/PULL_REQUEST_TEMPLATE/`. diff --git a/.gitignore b/.gitignore index 09e9925..db847ee 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ .github/pr_descriptions/* -!.github/pr_descriptions/pull_request_template.md -!.github/pr_descriptions/chore_improve_docs_pr.md \ No newline at end of file +!.github/pr_descriptions/pull_request_template.md \ No newline at end of file