Skip to content

Add GitHub Actions workflow for Dokku deployments#3

Merged
VinneyJ merged 24 commits into
mainfrom
chore/dokku-github-actions
May 8, 2026
Merged

Add GitHub Actions workflow for Dokku deployments#3
VinneyJ merged 24 commits into
mainfrom
chore/dokku-github-actions

Conversation

@VinneyJ
Copy link
Copy Markdown
Contributor

@VinneyJ VinneyJ commented Apr 20, 2026

Summary

  • replace the old EC2 SSH deployment workflow with a Dockerfile-based CI and Dokku deploy pipeline
  • validate the app image before deployment using Docker Buildx and a smoke import check
  • add automatic DEV deploys from main and a manual, environment-gated PROD deploy path

Notes

  • this PR only includes changes to .github/workflows/deploy.yml
  • dev and prod GitHub Environments should provide DOKKU_HOST, DOKKU_APP_NAME, and DOKKU_SSH_PRIVATE_KEY
  • PROD should use required reviewers in the prod environment if approval is desired

@VinneyJ VinneyJ requested a review from a team April 24, 2026 08:57
Comment thread config/settings.py Outdated
Comment on lines 11 to 19
@@ -18,14 +19,13 @@
SECRET_KEY = "(@lhxdh^3z1aea9xjny21q^0crno_h48*3!y7en!g#x(5^*zad"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I know this isn't part of the changes you've made but this whole block is unnecessarily convoluted. It could simply be:

SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', '(@lhxdh^3z1aea9xjny21q^0crno_h48*3!y7en!g#x(5^*zad')

Perhaps we need a separate review of the codebase.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Also @hanna-tes Please confirm that this isn't the actual secret key used in prod.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @maquchizi it is the actual secret key i hv it in env but i forgot to remove it here and just use the .getenv 🤭

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah pls do if u have some time kindly review the codebase @VinneyJ @maquchizi i really appreciate that it will help a lot.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Now that this key has been exposed, let's make sure that it is changed immediately.

Comment thread config/settings.py
Comment thread .github/workflows/deploy.yml Outdated
Comment thread .github/workflows/deploy.yml
Comment thread Dockerfile
Comment thread .github/workflows/deploy.yml Outdated
Comment thread .github/workflows/deploy.yml Outdated
VinneyJ added 2 commits May 5, 2026 13:17
…ions

- Simplify SECRET_KEY to use os.getenv with empty string fallback
- Replace manual image versioning with docker/metadata-action@v6
- Bump dokku/github-action from v1.9.0 to v1.10.0
- Update all GitHub Actions to latest major versions
@VinneyJ VinneyJ merged commit 608d983 into main May 8, 2026
1 check failed
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