mirror of
https://github.com/bensuperpc/infrastructure.git
synced 2025-06-30 14:15:50 +02:00
Improve Forgejo
This commit is contained in:
23
README.md
23
README.md
@ -88,6 +88,7 @@ And then, caddy will generate the certificate for you and renew it automatically
|
|||||||
| [qbittorrent.bensuperpc.org](https://qbittorrent.bensuperpc.org) | Sub | Torrent client/server |
|
| [qbittorrent.bensuperpc.org](https://qbittorrent.bensuperpc.org) | Sub | Torrent client/server |
|
||||||
| [transmission.bensuperpc.org](https://transmission.bensuperpc.org) | Sub | Torrent client/server |
|
| [transmission.bensuperpc.org](https://transmission.bensuperpc.org) | Sub | Torrent client/server |
|
||||||
| [git.bensuperpc.org](https://git.bensuperpc.org) | Sub | Gitea for git |
|
| [git.bensuperpc.org](https://git.bensuperpc.org) | Sub | Gitea for git |
|
||||||
|
| [forgejo.bensuperpc.org](https://forgejo.bensuperpc.org/) | Sub | Fork of Gitea for git |
|
||||||
| [link.bensuperpc.org](https://link.bensuperpc.org) | Sub | For link shortener |
|
| [link.bensuperpc.org](https://link.bensuperpc.org) | Sub | For link shortener |
|
||||||
| [jellyfin.bensuperpc.org](https://jellyfin.bensuperpc.org) | Sub | Jellyfin for media server |
|
| [jellyfin.bensuperpc.org](https://jellyfin.bensuperpc.org) | Sub | Jellyfin for media server |
|
||||||
| [syncthing.bensuperpc.org](https://syncthing.bensuperpc.org) | Sub | SyncThing for file synchronization |
|
| [syncthing.bensuperpc.org](https://syncthing.bensuperpc.org) | Sub | SyncThing for file synchronization |
|
||||||
@ -284,19 +285,39 @@ You can change the homepage config in these files:
|
|||||||
```sh
|
```sh
|
||||||
docker exec -it forgejo_runner /bin/bash
|
docker exec -it forgejo_runner /bin/bash
|
||||||
```
|
```
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
forgejo-runner generate-config > /data/config.yml
|
forgejo-runner generate-config > /data/config.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Now update the config.yml file to support docker-in-docker:
|
||||||
|
|
||||||
|
```yml
|
||||||
|
envs:
|
||||||
|
DOCKER_TLS_VERIFY: 1
|
||||||
|
DOCKER_CERT_PATH: /certs/client
|
||||||
|
DOCKER_HOST: tcp://docker:2376
|
||||||
|
labels: ["ubuntu-latest:docker://node:20-bookworm", "ubuntu-22.04:docker://node:20-bookworm"]
|
||||||
|
network: host
|
||||||
|
options: -v /certs/client:/certs/client
|
||||||
|
valid_volumes:
|
||||||
|
- /certs/client
|
||||||
|
```
|
||||||
|
|
||||||
|
Register the runner with your Forgejo instance:
|
||||||
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
forgejo-runner register
|
forgejo-runner register
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You will need to provide the following information:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
https://forgejo.bensuperpc.org/
|
https://forgejo.bensuperpc.org/
|
||||||
<Your Registration Token, in https://forgejo.bensuperpc.org/admin/actions/runners>
|
<Your Registration Token, in https://forgejo.bensuperpc.org/admin/actions/runners>
|
||||||
main
|
|
||||||
ubuntu-22.04:docker://ghcr.io/catthehacker/ubuntu:act-22.04
|
ubuntu-22.04:docker://ghcr.io/catthehacker/ubuntu:act-22.04
|
||||||
|
main
|
||||||
```
|
```
|
||||||
|
|
||||||
### Docker volumes
|
### Docker volumes
|
||||||
|
@ -14,7 +14,6 @@ services:
|
|||||||
env_file:
|
env_file:
|
||||||
- ./env/forgejo.env
|
- ./env/forgejo.env
|
||||||
volumes:
|
volumes:
|
||||||
# /var/lib/gitea/custom/conf/app.ini
|
|
||||||
- forgejo_data:/var/lib/gitea
|
- forgejo_data:/var/lib/gitea
|
||||||
- forgejo_config:/etc/gitea
|
- forgejo_config:/etc/gitea
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
@ -45,15 +44,19 @@ services:
|
|||||||
|
|
||||||
# forgejo-runner
|
# forgejo-runner
|
||||||
docker-in-docker:
|
docker-in-docker:
|
||||||
image: docker:dind
|
image: code.forgejo.org/oci/docker:dind
|
||||||
|
container_name: 'docker_dind'
|
||||||
|
hostname: docker
|
||||||
networks:
|
networks:
|
||||||
- infra-network
|
- infra-network
|
||||||
profiles:
|
profiles:
|
||||||
- forgejo
|
- forgejo
|
||||||
container_name: 'docker_dind'
|
|
||||||
privileged: true
|
privileged: true
|
||||||
command: [ 'dockerd', '-H', 'tcp://0.0.0.0:2375', '--tls=false' ]
|
environment:
|
||||||
restart: 'unless-stopped'
|
DOCKER_TLS_CERTDIR: /certs
|
||||||
|
DOCKER_HOST: docker-in-docker
|
||||||
|
volumes:
|
||||||
|
- forgejo_certs:/certs
|
||||||
|
|
||||||
forgejo_runner:
|
forgejo_runner:
|
||||||
image: 'code.forgejo.org/forgejo/runner:6.3.1'
|
image: 'code.forgejo.org/forgejo/runner:6.3.1'
|
||||||
@ -68,14 +71,18 @@ services:
|
|||||||
condition: service_started
|
condition: service_started
|
||||||
container_name: 'forgejo_runner'
|
container_name: 'forgejo_runner'
|
||||||
environment:
|
environment:
|
||||||
DOCKER_HOST: tcp://docker-in-docker:2375
|
DOCKER_HOST: tcp://docker:2376
|
||||||
|
DOCKER_CERT_PATH: /certs/client
|
||||||
|
DOCKER_TLS_VERIFY: "1"
|
||||||
# user: 1001:1001
|
# user: 1001:1001
|
||||||
volumes:
|
volumes:
|
||||||
|
# - ./config/forgejo_runner/config.yaml:/config.yaml:ro
|
||||||
- forgejo_runner:/data
|
- forgejo_runner:/data
|
||||||
|
- forgejo_certs:/certs
|
||||||
restart: 'unless-stopped'
|
restart: 'unless-stopped'
|
||||||
|
|
||||||
# command: '/bin/sh -c "while : ; do sleep 1 ; done ;"'
|
command: '/bin/sh -c "while : ; do sleep 1 ; done ;"'
|
||||||
command: '/bin/sh -c "sleep 5; forgejo-runner -c /data/config.yml daemon"'
|
# command: '/bin/sh -c "sleep 5; forgejo-runner -c /data/config.yml daemon"'
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
forgejo_data:
|
forgejo_data:
|
||||||
|
Reference in New Issue
Block a user