Compare commits
No commits in common. "6b996253cfa3c9b4a3b775920e35adb199a29bd8" and "890778d33ad275cf8dabc2b0e18c004ed2b46f8f" have entirely different histories.
6b996253cf
...
890778d33a
2 changed files with 12 additions and 8 deletions
|
@ -31,8 +31,6 @@ jobs:
|
||||||
- name: run the example
|
- name: run the example
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
mkdir -p /srv/runner-data
|
|
||||||
chown 1000:1000 /srv/runner-data
|
|
||||||
cd examples/docker-compose
|
cd examples/docker-compose
|
||||||
secret=$(openssl rand -hex 20)
|
secret=$(openssl rand -hex 20)
|
||||||
sed -i -e "s/{SHARED_SECRET}/$secret/" compose-forgejo-and-runner.yml
|
sed -i -e "s/{SHARED_SECRET}/$secret/" compose-forgejo-and-runner.yml
|
||||||
|
@ -40,7 +38,7 @@ jobs:
|
||||||
#
|
#
|
||||||
# Launch Forgejo & the runner
|
# 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
|
for delay in $(seq 60) ; do test -f /srv/runner-data/.runner && break ; sleep 30 ; done
|
||||||
test -f /srv/runner-data/.runner
|
test -f /srv/runner-data/.runner
|
||||||
#
|
#
|
||||||
|
|
|
@ -13,8 +13,11 @@
|
||||||
#
|
#
|
||||||
# Replace ${RUNNER_TOKEN} with the token obtained from the Forgejo web interface.
|
# 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:
|
volumes:
|
||||||
docker_certs:
|
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
|
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
|
restart: unless-stopped
|
||||||
privileged: true
|
privileged: true
|
||||||
|
networks:
|
||||||
|
- forgejo
|
||||||
environment:
|
environment:
|
||||||
DOCKER_TLS_CERTDIR: "/certs" # set to "" to disable the use of TLS, also manually update existing runner configs to use port 2375
|
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
|
DOCKER_HOST: "docker" # remove aswell to disable TLS
|
||||||
|
@ -33,6 +38,8 @@ services:
|
||||||
forgejo:
|
forgejo:
|
||||||
image: codeberg.org/forgejo/forgejo:1.21
|
image: codeberg.org/forgejo/forgejo:1.21
|
||||||
hostname: forgejo
|
hostname: forgejo
|
||||||
|
networks:
|
||||||
|
- forgejo
|
||||||
volumes:
|
volumes:
|
||||||
- /srv/forgejo-data:/data
|
- /srv/forgejo-data:/data
|
||||||
ports:
|
ports:
|
||||||
|
@ -43,7 +50,7 @@ services:
|
||||||
bash -c '
|
bash -c '
|
||||||
/bin/s6-svscan /etc/s6 &
|
/bin/s6-svscan /etc/s6 &
|
||||||
sleep 10 ;
|
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 ;
|
su -c "forgejo forgejo-cli actions register --secret {SHARED_SECRET}" git ;
|
||||||
sleep infinity
|
sleep infinity
|
||||||
'
|
'
|
||||||
|
@ -62,12 +69,11 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- /srv/runner-data:/data
|
- /srv/runner-data:/data
|
||||||
- docker_certs:/certs
|
- docker_certs:/certs
|
||||||
|
networks:
|
||||||
|
- forgejo
|
||||||
depends_on:
|
depends_on:
|
||||||
- docker-in-docker
|
- docker-in-docker
|
||||||
- forgejo
|
- forgejo
|
||||||
links:
|
|
||||||
- forgejo
|
|
||||||
- docker-in-docker
|
|
||||||
environment:
|
environment:
|
||||||
CONFIG_FILE: config.yml # defaults to /data/config.yml
|
CONFIG_FILE: config.yml # defaults to /data/config.yml
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue