Great tutorial there! The only challenge I had was that the workflow fails when it gets to the point of restarting the gunicorn service. This is because it is using a sudo command which requires a password. One workaround I did was to store my Ubuntu server password as a secret on Git Hub and then echo it alongside the sudo command and this caused the password to be supplied. I understand that this is not a perfect implementation, as there are security risks with it. Did you encounter such issues? How were you able to resolve it? Thanks.
Thanks! To avoid security risks, you can configure `sudo` to allow your service restart command without a password. Here's how: 1. **Edit the sudoers file**: ``` $ sudo visudo ``` 2. **Add this line** (replace `username` with your actual username and `/path/to/gunicorn-restart.sh` with your script path): ``` username ALL=(ALL) NOPASSWD: /path/to/gunicorn-restart.sh ``` This way, your GitHub Actions workflow can run the command without requiring a password. Hope this helps!
Sure, you can use the free trial instance for up to 72 hours. When not in use, it's advisable to either stop and start it again or, if unnecessary, you can choose to delete the instance to avoid the charges.
madam you are great, I am North Indian but the tutorial was in English so i was able to understand.
thankyou for the tutorial.
Glad to hear that😊
Great tutorial there!
The only challenge I had was that the workflow fails when it gets to the point of restarting the gunicorn service. This is because it is using a sudo command which requires a password.
One workaround I did was to store my Ubuntu server password as a secret on Git Hub and then echo it alongside the sudo command and this caused the password to be supplied.
I understand that this is not a perfect implementation, as there are security risks with it.
Did you encounter such issues? How were you able to resolve it?
Thanks.
Thanks! To avoid security risks, you can configure `sudo` to allow your service restart command without a password. Here's how:
1. **Edit the sudoers file**:
```
$ sudo visudo
```
2. **Add this line** (replace `username` with your actual username and `/path/to/gunicorn-restart.sh` with your script path):
```
username ALL=(ALL) NOPASSWD: /path/to/gunicorn-restart.sh
```
This way, your GitHub Actions workflow can run the command without requiring a password.
Hope this helps!
is AWS instance is free of coast for host my simple flask application, mam
Sure, you can use the free trial instance for up to 72 hours. When not in use, it's advisable to either stop and start it again or, if unnecessary, you can choose to delete the instance to avoid the charges.