Skip to content

Conversation

@Bob-six
Copy link
Collaborator

@Bob-six Bob-six commented Jun 29, 2025

Summary by Sourcery

Configure production Dokku deployment by updating CI workflow, adjusting Procfile, and adding app.json.

Enhancements:

  • Add Celery beat process and adjust Gunicorn worker count in Procfile

CI:

  • Deploy to Dokku server on main branch using SSH secrets in CI workflow

Deployment:

  • Add app.json to configure Dokku formation and healthchecks

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jun 29, 2025

Reviewer's Guide

This PR adds Dokku deployment settings for production by updating the GitHub Actions workflow to target the main branch with secrets-based configuration, refining Procfile processes, and introducing an app.json for Dokku process formation and health checks.

Class diagram for Procfile and app.json process formation

classDiagram
  class App {
    +web: gunicorn (2 workers, 2 threads)
    +worker: celery worker -B
    +beat: celery beat -l INFO
    +release: python manage.py migrate
  }
  class Formation {
    +web: quantity = 1
    +worker: quantity = 1
    +beat: quantity = 1
    +release: quantity = 1
  }
  class Healthchecks {
    +web: [type, name, description, path, attempts, interval, wait, initialDelay]
  }
  App o-- Formation
  App o-- Healthchecks
Loading

File-Level Changes

Change Details Files
Updated GitHub Actions workflow for production deployment
  • Renamed workflow and branch trigger from 'develop' to 'main'
  • Updated remote host configuration to use secrets for IP and project name
  • Removed force push of the 'develop' branch
.github/workflows/dev-deploy.yml
.github/workflows/main-deploy.yml
Modified Procfile to adjust runtime processes
  • Added a 'beat' process for Celery scheduling
  • Reduced the web process worker count from 4 to 2
Procfile
Introduced app.json for Dokku app formation and health checks
  • Defined process formation quantities for web, worker, beat, and release
  • Configured a startup health check for the web process
app.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@Bob-six Bob-six merged commit 2511a22 into main Jun 29, 2025
0 of 2 checks passed
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @Bob-six - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `app.json:22` </location>
<code_context>
+        "type": "startup",
+        "name": "web check",
+        "description": "Checking if the app responds to the healthcheck endpoint",
+        "path": "/pass/art/1",
+        "attempts": 10,
+        "interval": "30s",
</code_context>

<issue_to_address>
The healthcheck path should be stable and lightweight.

Verify that '/pass/art/1' is suitable for healthchecks—always available, lightweight, and without side effects. If not, use a dedicated healthcheck endpoint.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
        "path": "/pass/art/1",
=======
        "path": "/health",
>>>>>>> REPLACE

</suggested_fix>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

"type": "startup",
"name": "web check",
"description": "Checking if the app responds to the healthcheck endpoint",
"path": "/pass/art/1",
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: The healthcheck path should be stable and lightweight.

Verify that '/pass/art/1' is suitable for healthchecks—always available, lightweight, and without side effects. If not, use a dedicated healthcheck endpoint.

Suggested change
"path": "/pass/art/1",
"path": "/health",

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.

2 participants