-
Notifications
You must be signed in to change notification settings - Fork 19
docs for kamal github action #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
bf387f5
36019f8
eaad8eb
c37ddf4
e1e7bfa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -474,3 +474,25 @@ ALLOWED_HOSTS = [ | |
|
|
||
| It is recommended to read [the security documentation](https://docs.djangoproject.com/en/5.0/topics/security/#host-headers-virtual-hosting) | ||
| for this feature to understand the implications of it being included. | ||
|
|
||
|
|
||
| ### Deploy with GitHub Actions | ||
|
|
||
| Your repository also includes a GitHub Actions workflow that can be used to deploy your app to Kamal | ||
| (look for it in `.github/workflows/kamal_deploy.yml`). To configure the workflow you will set some secrets | ||
| in your repository settings. | ||
|
|
||
| In your repositories settings page, go to the "Secrets and variables -> Actions" section and add the following | ||
| secrets: | ||
snopoke marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - `DOCKER_REGISTRY_USERNAME` | ||
| - Your Docker Hub username. | ||
| - `DOCKER_REGISTRY_KEY` | ||
| - The Docker Hub access token you created above. | ||
| - `SSH_KEY` | ||
| - A private key you use to SSH into your server. This must be a passwordless key. | ||
| - `SSH_KNOWN_HOSTS` | ||
| - The known hosts file for your server. You can generate this by running `ssh-keyscan <your-server-ip>`. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What exactly do I use here? If I run that command I get something like this: Do I just paste that whole thing into the environment variable?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes |
||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We might also want a note here about it being tied to docker hub with a one-liner about how to chnage it.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've added a note about this. Depending on the repo there may be different steps required. I could add a second file for AWS ECR which is a bit different. |
||
| With these secrets set, the GitHub Actions workflow will be able to deploy your app to Kamal. To test it | ||
| go to the "Actions" tab in your repository, click on the "Kamal Deploy" workflow, and then click "Run workflow". | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (It will also then run on every push to main, right?)
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we also have to tell them to uncomment the
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As it stands you can run it manually. For automated deploys you have to uncomment the lines in the workflow file as indicated by the comment in that file. |
||
Uh oh!
There was an error while loading. Please reload this page.