70 lines
1.8 KiB
YAML
70 lines
1.8 KiB
YAML
# Copyright 2024 The Forgejo Authors.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
#
|
|
# Create a secret with:
|
|
#
|
|
# openssl rand -hex 20
|
|
#
|
|
# Replace all occurences of {SHARED_SECRET} below with the output.
|
|
#
|
|
# NOTE: a token obtained from the Forgejo web interface cannot be used
|
|
# as a shared secret.
|
|
#
|
|
# Replace {RUNNER_TOKEN} with the token obtained from the Forgejo web interface.
|
|
#
|
|
|
|
networks:
|
|
forgejo:
|
|
|
|
volumes:
|
|
docker_certs:
|
|
|
|
services:
|
|
docker-in-docker:
|
|
image: code.forgejo.org/oci/docker:dind
|
|
container_name: docker # needed for docker internal DNS resolution
|
|
hostname: docker # Must set hostname as TLS certificates are only valid for docker or localhost
|
|
privileged: true
|
|
networks:
|
|
- forgejo
|
|
environment:
|
|
DOCKER_TLS_CERTDIR: /certs
|
|
DOCKER_HOST: docker-in-docker
|
|
volumes:
|
|
- docker_certs:/certs
|
|
|
|
forgejo:
|
|
image: codeberg.org/forgejo/forgejo:1.21
|
|
container_name: forgejo
|
|
networks:
|
|
- forgejo
|
|
volumes:
|
|
- ./forgejo:/data
|
|
ports:
|
|
- 8080:3000
|
|
|
|
forgejo-runner:
|
|
## TODO: Update image to the the release
|
|
## made from this PR: https://code.forgejo.org/forgejo/runner/pulls/283
|
|
|
|
# image: code.forgejo.org/forgejo/runner:3.4.1
|
|
build: ../../
|
|
container_name: forgejo-runner
|
|
volumes:
|
|
- ./forgejo-runner:/data
|
|
- docker_certs:/certs
|
|
networks:
|
|
- forgejo
|
|
depends_on:
|
|
- docker-in-docker
|
|
- forgejo
|
|
environment:
|
|
CONFIG_FILE: config.yml # defaults to /data/config.yml
|
|
|
|
FORGEJO_URL: ${FORGEJO_URL} # defaults to http://forgejo:3000
|
|
|
|
RUNNER_FILE: runner.json # defaults to /data/runner.json
|
|
RUNNER_NAME: forgejo-runner # defaults to forgejo-runner, used for registration
|
|
RUNNER_TOKEN: "{RUNNER_TOKEN}"
|
|
RUNNER_USER: 1000 # defaults to 1000
|