-
-
Notifications
You must be signed in to change notification settings - Fork 38
Setup for Self Hosted Actions Runner to deploy the API
-
On your VM, create a new user with sudo privileges. Follow the instructions here.
-
SSH using the new user account and install docker as well as docker compose. Note: Make sure you add your user account to the docker group once docker is installed.
-
Go to the Settings tab in the GitHub project and click on the Actions menu on the sidebar.
-
There, you'll notice the Runners tab under the Actions menu. Click on the Runners tab.
-
On the Runners page, click the Add runner button that will take you to the Add self-hosted runner page.
-
On the Add self-hosted runner page, choose the Operating System as Linux and Architecture type as X64, and follow the instructions mentioned on the page.
-
After downloading the runner package, go to the configure section and configure the runner.
-
After configuring the runner, do not run
./run.sh
. This will only the runner in transient mode. To make the runner a systemd service, run the commandsudo ./svc.sh install
This will create a systemd service so the runner will automatically run even after the VM restarts. -
After installing the runner, start the runner using the command
sudo ./svc.sh start
. You can check the status of the runner using the commandsudo ./svc.sh status
.
If you get a permissions error at the build docker images
step when deploying the code from Github Actions to the VM, follow the instructions in the first answer below to add your user to the docker group.
https://stackoverflow.com/questions/48957195/how-to-fix-docker-got-permission-denied-issue/48957722#48957722