Compare commits

..

No commits in common. "6b996253cfa3c9b4a3b775920e35adb199a29bd8" and "890778d33ad275cf8dabc2b0e18c004ed2b46f8f" have entirely different histories.

2 changed files with 12 additions and 8 deletions

View file

@ -31,8 +31,6 @@ jobs:
- name: run the example
run: |
set -x
mkdir -p /srv/runner-data
chown 1000:1000 /srv/runner-data
cd examples/docker-compose
secret=$(openssl rand -hex 20)
sed -i -e "s/{SHARED_SECRET}/$secret/" compose-forgejo-and-runner.yml
@ -40,7 +38,7 @@ jobs:
#
# Launch Forgejo & the runner
#
$cli up -d --remove-orphans
$cli up -d
for delay in $(seq 60) ; do test -f /srv/runner-data/.runner && break ; sleep 30 ; done
test -f /srv/runner-data/.runner
#

View file

@ -13,8 +13,11 @@
#
# Replace ${RUNNER_TOKEN} with the token obtained from the Forgejo web interface.
#
# Replace {ROOT_PASSWORD} with a secure password.
# Replace ROOT_PASSWORD with a secure password.
#
networks:
forgejo:
volumes:
docker_certs:
@ -24,6 +27,8 @@ services:
hostname: docker # Must set hostname for both internal DNS and TLS to work as certs are only valid for docker and localhost
restart: unless-stopped
privileged: true
networks:
- forgejo
environment:
DOCKER_TLS_CERTDIR: "/certs" # set to "" to disable the use of TLS, also manually update existing runner configs to use port 2375
DOCKER_HOST: "docker" # remove aswell to disable TLS
@ -33,6 +38,8 @@ services:
forgejo:
image: codeberg.org/forgejo/forgejo:1.21
hostname: forgejo
networks:
- forgejo
volumes:
- /srv/forgejo-data:/data
ports:
@ -43,7 +50,7 @@ services:
bash -c '
/bin/s6-svscan /etc/s6 &
sleep 10 ;
su -c "forgejo admin user create --admin --username root --password {ROOT_PASSWORD} --email root@example.com" git ;
su -c "forgejo admin user create --admin --username root --password ROOT_PASSWORD --email root@example.com" git ;
su -c "forgejo forgejo-cli actions register --secret {SHARED_SECRET}" git ;
sleep infinity
'
@ -62,12 +69,11 @@ services:
volumes:
- /srv/runner-data:/data
- docker_certs:/certs
networks:
- forgejo
depends_on:
- docker-in-docker
- forgejo
links:
- forgejo
- docker-in-docker
environment:
CONFIG_FILE: config.yml # defaults to /data/config.yml