I guess it works now

sorry for the unprofessional commit message, I have been working on this effectively non-stop since the previous commit, and have been fighting docker networking being inconsistent as well as filepermisson issues,

end me
This commit is contained in:
merith-xyz 2024-09-26 19:00:54 -07:00
parent f9ff5dce17
commit 00584cc415
2 changed files with 74 additions and 54 deletions

View file

@ -23,13 +23,13 @@ volumes:
services:
docker-in-docker:
image: code.forgejo.org/oci/docker:dind
# container_name: docker # Must set container_name to docker for both internal DNS and TLS to work
hostname: docker
hostname: docker # Must set hostname for both internal DNS and TLS to work as certs are only valid for docker and localhost
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
volumes:
- docker_certs:/certs
@ -39,7 +39,7 @@ services:
networks:
- forgejo
volumes:
- ./forgejo:/data
- /srv/forgejo-data:/data
ports:
- 8080:3000
command: >-
@ -54,15 +54,16 @@ services:
# all values that have defaults listed are optional
# only FORGEJO_SECRET or RUNNER_TOKEN is required
# FORGEJO_URL is required if forgejo is in this compose file or docker network
forgejo-runner:
runner-daemon:
## 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: ../../
# user: "1000" # set to run rootless, overrides RUNNER_USER and disables automatic file ownership
restart: unless-stopped # needed for fixing file ownership on restart
volumes:
- ./forgejo-runner:/data
- /srv/runner-data:/data
- docker_certs:/certs
networks:
- forgejo
@ -72,16 +73,16 @@ services:
environment:
CONFIG_FILE: config.yml # defaults to /data/config.yml
DOCKER_HOST: "docker" # defaults to docker
DOCKER_TLS_CERTDIR: "/certs/client" # defaults to /certs/client
DOCKER_HOST: "tcp://docker:2376" # defaults to tcp://docker:2376
DOCKER_CERT_PATH: "/certs/client" # defaults to /certs/client
DOCKER_TLS_VERIFY: "1" # defaults to 0, set to 1 to enable TLS
FORGEJO_URL: ${FORGEJO_URL} # defaults to http://forgejo:3000
FORGEJO_SECRET: "{SHARED_SECRET}" # shared secret, must match Forgejo's, overrides RUNNER_TOKEN
RUNNER_FILE: .runner # defaults to /data/runner.json
RUNNER_NAME: forgejo-runner # defaults to forgejo-runner, used for registration
RUNNER_TOKEN: "${RUNNER_TOKEN}"
RUNNER_NAME: runner-daemon # defaults to forgejo-runner, used for registration
RUNNER_TOKEN: ${RUNNER_TOKEN} # token obtained from Forgejo web interface
RUNNER_USER: 1000 # defaults to 1000, allows for automatic file ownership
DEBUG: "true" # defaults to false, set to true to enable debug logging