examples/docker-compose: network: host is required
otherwise a network will be created with no route to the forgejo instance and a checkout will fail to reach it
This commit is contained in:
parent
e8448e3807
commit
bf11dac848
2 changed files with 2 additions and 1 deletions
|
@ -19,7 +19,7 @@ services:
|
||||||
cd /srv/demo ;
|
cd /srv/demo ;
|
||||||
git init --initial-branch=main ;
|
git init --initial-branch=main ;
|
||||||
mkdir -p .forgejo/workflows ;
|
mkdir -p .forgejo/workflows ;
|
||||||
echo "{ on: [push], jobs: { test: { runs-on: docker, steps: [ { run: echo All Good } ] } } }" > .forgejo/workflows/demo.yml ;
|
echo "{ on: [push], jobs: { test: { runs-on: docker, steps: [ {uses: actions/checkout@v4}, { run: echo All Good } ] } } }" > .forgejo/workflows/demo.yml ;
|
||||||
git add . ;
|
git add . ;
|
||||||
git config user.email root@example.com ;
|
git config user.email root@example.com ;
|
||||||
git config user.name username ;
|
git config user.name username ;
|
||||||
|
|
|
@ -62,6 +62,7 @@ services:
|
||||||
sleep 1 ;
|
sleep 1 ;
|
||||||
done ;
|
done ;
|
||||||
forgejo-runner generate-config > config.yml ;
|
forgejo-runner generate-config > config.yml ;
|
||||||
|
sed -i -e "s|network: .*|network: host|" config.yml ;
|
||||||
sed -i -e "s|labels: \[\]|labels: \[\"docker:docker://alpine:3.18\"\]|" config.yml ;
|
sed -i -e "s|labels: \[\]|labels: \[\"docker:docker://alpine:3.18\"\]|" config.yml ;
|
||||||
chown -R 1000:1000 /data
|
chown -R 1000:1000 /data
|
||||||
'
|
'
|
||||||
|
|
Loading…
Reference in a new issue