Add support for Gitea actions via act_runner. #19

Merged
telackey merged 3 commits from telackey/act_runner into main 2023-03-25 17:36:04 +00:00
Member

This adds an act_runner instance to the docker-compose.

There is no good way to retrieve a token for registering the runner from Gitea at this time, so we seed the DB with one during initialization.

This adds an act_runner instance to the docker-compose. There is no good way to retrieve a token for registering the runner from Gitea at this time, so we seed the DB with one during initialization.
dboreham reviewed 2023-03-25 04:23:40 +00:00
@ -51,0 +61,4 @@
- gitea
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./act_runner:/data
Owner

For...reasons...we use gitea.local rather than host.docker.internal. I forget for the moment exactly those reasons. Possibly because we want the hostname to be usable from the host as well as inside containers. Possibly also we want to be able to target a gitea that is running somewhere other than on the host?

For...reasons...we use `gitea.local` rather than `host.docker.internal`. I forget for the moment exactly those reasons. Possibly because we want the hostname to be usable from the host as well as inside containers. Possibly also we want to be able to target a gitea that is running somewhere other than on the host?
telackey reviewed 2023-03-25 05:27:44 +00:00
@ -51,0 +61,4 @@
- gitea
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./act_runner:/data
Author
Member

The GITEA_INSTANCE_URL is used by act_runner for two things: (1) what endpoint to poll for new tasks, (2) for constructing the URL to pass to any spawned task executors for checking out code.

Unfortunately neither server (the container name in the stack) nor gitea.local are resolvable for both (1) and (2). server works for (1) but not (2) (since task containers spawned by act_runner are not in the same SO stack) and gitea.local won't work for either, since it isn't resolvable inside docker.

The only name thing I've found that works universally is to reach back to the exposed port on the host.

The GITEA_INSTANCE_URL is used by act_runner for two things: (1) what endpoint to poll for new tasks, (2) for constructing the URL to pass to any spawned task executors for checking out code. Unfortunately neither `server` (the container name in the stack) nor `gitea.local` are resolvable for both (1) and (2). `server` works for (1) but not (2) (since task containers spawned by act_runner are not in the same SO stack) and gitea.local won't work for either, since it isn't resolvable _inside_ docker. The only name thing I've found that works universally is to reach back to the exposed port on the host.
telackey reviewed 2023-03-25 05:43:55 +00:00
@ -51,0 +61,4 @@
- gitea
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./act_runner:/data
Author
Member

(Note, if we could somehow make sure that any newly spawned task containers were attached to the same stack, we could likely use server.)

(Note, if we could somehow make sure that any newly spawned task containers were attached to the same stack, we could likely use `server`.)
dboreham reviewed 2023-03-25 08:03:54 +00:00
@ -51,0 +61,4 @@
- gitea
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./act_runner:/data
Owner

Hmm. I thought host.docker.internal wasn't defined in all Docker installs?

Hmm. I thought `host.docker.internal` wasn't defined in all Docker installs?
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/hosting#19
No description provided.