Use a default conf inside act_runner docker image #13827

Open
opened 2025-11-02 10:54:18 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @Agterra on GitHub (Dec 15, 2024).

Feature Description

Hi,

I recently started teaching a class about containerization and self-hosted git solutions with CI/CDs, and I decided to show them Gitea, because of its ease of use and fast deployment.

But when we set up a runner, I saw that we have to generate the config file then feed it to the container and specify the CONFIG_FILE environment variable. Which is fine, but could be smoother.

Is there a specific reason for this approach ? I didn't find posts about this in the issues.

My feature request is:

Could act_runner docker image use a config file by default that you can modify through environment variables, juste like the gitea image ? (ex: GITEA__database__DB_TYPE)

Thanks

I'll try to submit a PR for this if you find it useful.

Screenshots

No response

Originally created by @Agterra on GitHub (Dec 15, 2024). ### Feature Description Hi, I recently started teaching a class about containerization and self-hosted git solutions with CI/CDs, and I decided to show them Gitea, because of its ease of use and fast deployment. But when we set up a runner, I saw that we have to generate the config file then feed it to the container and specify the CONFIG_FILE environment variable. Which is fine, but could be smoother. Is there a specific reason for this approach ? I didn't find posts about this in the issues. My feature request is: **Could act_runner docker image use a config file by default that you can modify through environment variables, juste like the gitea image ? (ex: GITEA__database__DB_TYPE)** Thanks I'll try to submit a PR for this if you find it useful. ### Screenshots _No response_
GiteaMirror added the topic/gitea-actionstype/proposal labels 2025-11-02 10:54:18 -06:00
Author
Owner

@lunny commented on GitHub (Dec 15, 2024):

Gitea's solution GITEA__database__DB_TYPE is not the best choice from my perspective. The logic is very complicated and may cause unknown bugs. I'm not against PR for that but I know it's not easy.

@lunny commented on GitHub (Dec 15, 2024): Gitea's solution `GITEA__database__DB_TYPE` is not the best choice from my perspective. The logic is very complicated and may cause unknown bugs. I'm not against PR for that but I know it's not easy.
Author
Owner

@yp05327 commented on GitHub (Dec 16, 2024):

Actually, config file is not necessary.

Configuration is optional, but you could also generate config file with docker:
From : https://docs.gitea.com/usage/actions/act-runner#configuration-1

Also, if it is possible, can you share where did you find that the config file is necessary or something let you think about it? Maybe we can improve it later if it comes from out doc or other places? Thanks a lot.

@yp05327 commented on GitHub (Dec 16, 2024): Actually, config file is not necessary. > Configuration is optional, but you could also generate config file with docker: > From : https://docs.gitea.com/usage/actions/act-runner#configuration-1 Also, if it is possible, can you share where did you find that the config file is necessary or something let you think about it? Maybe we can improve it later if it comes from out doc or other places? Thanks a lot.
Author
Owner

@Agterra commented on GitHub (Jan 31, 2025):

The config is not necessary, and that's my point: it should be, and a default one should be provided by default.

It feels weird having to generate the config file instead of overloading an existing one or completing an existing one

@Agterra commented on GitHub (Jan 31, 2025): The config is not necessary, and that's my point: it should be, and a default one should be provided by default. It feels weird having to generate the config file instead of overloading an existing one or completing an existing one
Author
Owner

@yp05327 commented on GitHub (Feb 1, 2025):

The config is not necessary, and that's my point: it should be, and a default one should be provided by default.

Agree. If you want to change something, you should deploy the runner first and then generate a default config file in side the container if you are using docker.

Also, about the config.yaml, I think this should be improved:
When you use docker to deploy a runner and mount a config file, docker will create a folder config.yaml instead of a file by default, which is very annoying. The solution can be: split CONFIG_FILE into CONFIG_DIR and CONFIG_FILE, then mount the folder CONFIG_DIR instead of CONFIG_FILE.

@yp05327 commented on GitHub (Feb 1, 2025): > The config is not necessary, and that's my point: it should be, and a default one should be provided by default. Agree. If you want to change something, you should deploy the runner first and then generate a default config file in side the container if you are using docker. Also, about the config.yaml, I think this should be improved: When you use docker to deploy a runner and mount a config file, docker will create a folder `config.yaml` instead of a file by default, which is very annoying. The solution can be: split `CONFIG_FILE` into `CONFIG_DIR` and `CONFIG_FILE`, then mount the folder `CONFIG_DIR` instead of `CONFIG_FILE`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13827