Compare commits
5 Commits
feat/dind
...
5.2.0+12.3
| Author | SHA1 | Date | |
|---|---|---|---|
| 4070f092fb | |||
| 65cdf55374 | |||
| 11ac9a5442 | |||
| a3bcc9b764 | |||
| e499c8e6ce |
@ -3,12 +3,14 @@ RECIPE=forgejo-runner
|
||||
# The level of logging, can be trace, debug, info, warn, error, fatal
|
||||
LOG_LEVEL=info
|
||||
|
||||
# Enable or disable caching. For the cache to work, the actions containers need to be able to access the runner via network, so make sure to set CONTAINER_NETWORK accordingly.
|
||||
CACHE_ENABLED=false
|
||||
CACHE_HOST="app"
|
||||
|
||||
# Defines the number of concrurrent tasks to be run
|
||||
RUNNER_CAPACITY=1
|
||||
|
||||
RUNNER_TIMEOUT=3h
|
||||
|
||||
# Set to 'host', to use the host network or any other. By using 'default', the runner gets configured to use the internal network of its own stack, so the action can access the docker
|
||||
# Set to 'host', to use the host network or any other. By using 'default', the runner gets configured to use the internal network of its own stack, so the action can access the docker socket proxy.
|
||||
#CONTAINER_NETWORK=default
|
||||
|
||||
@ -17,8 +17,12 @@ abra app cmd --chaos <app> app register_runner <host> <name> <token>
|
||||
To enable [caching](https://forgejo.org/docs/latest/admin/runner-installation/#cache-configuration) set `CACHE_ENABLED` to `true`:
|
||||
```
|
||||
CACHE_ENABLED=true
|
||||
CACHE_HOST="app"
|
||||
```
|
||||
|
||||
If you want to use the caching of the runner itself, you have to specify "app" as the `CACHE_HOST` and make sure to use the `default` in `CONTAINER_NETWORK` (see below), so the actions containers can access the runner.
|
||||
|
||||
|
||||
## Docker in Docker (in Docker)
|
||||
|
||||
Per default, the action container has the ability to access the docker socket of the host machine via the socket proxy in this recipe. Keep this in mind, since this is a security concern!
|
||||
|
||||
@ -15,7 +15,7 @@ services:
|
||||
- "data:/data"
|
||||
deploy:
|
||||
labels:
|
||||
- "coop-cloud.${STACK_NAME}.version=4.1.1+12.3.0"
|
||||
- "coop-cloud.${STACK_NAME}.version=5.2.0+12.3.0"
|
||||
networks:
|
||||
- internal
|
||||
ports:
|
||||
|
||||
@ -9,6 +9,7 @@ runner:
|
||||
capacity: {{ env "RUNNER_CAPACITY" }}
|
||||
# Extra environment variables to run jobs.
|
||||
envs:
|
||||
RUNNER_NETWORK_NAME: {{ if eq (env "CONTAINER_NETWORK") "default" }}{{ env "STACK_NAME" }}_internal{{ else }}{{ env "CONTAINER_NETWORK" }}{{ end }}
|
||||
# A_TEST_ENV_NAME_1: a_test_env_value_1
|
||||
# A_TEST_ENV_NAME_2: a_test_env_value_2
|
||||
# Extra environment variables to run jobs from a file.
|
||||
@ -39,7 +40,7 @@ cache:
|
||||
# The host of the cache server.
|
||||
# It's not for the address to listen, but the address to connect from job containers.
|
||||
# So 0.0.0.0 is a bad choice, leave it empty to detect automatically.
|
||||
host: ""
|
||||
host: "{{ env "CACHE_HOST" }}"
|
||||
# The port of the cache server.
|
||||
# 0 means to use a random available port.
|
||||
port: 44847
|
||||
|
||||
1
release/5.0.0+12.3.0
Normal file
1
release/5.0.0+12.3.0
Normal file
@ -0,0 +1 @@
|
||||
implement logic to set the stacks internal network for the action containers to support dind without a host port binding
|
||||
1
release/5.1.0+12.3.0
Normal file
1
release/5.1.0+12.3.0
Normal file
@ -0,0 +1 @@
|
||||
fix caching with the new container network approach
|
||||
1
release/5.2.0+12.3.0
Normal file
1
release/5.2.0+12.3.0
Normal file
@ -0,0 +1 @@
|
||||
add RUNNER_NETWORK_NAME env to the runner
|
||||
Reference in New Issue
Block a user