diff --git a/.woodpecker.yml b/.woodpecker.yml index dd3ce9d..59ae518 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -3,6 +3,7 @@ steps: image: python commands: - pip install requests + - sleep 10 && curl http://forgejo:3000 - make env.config build: @@ -20,13 +21,9 @@ services: forgejo: image: codeberg.org/forgejo/forgejo:1.20.1-0 environment: - - USER_UID=1001 - - USER_GID=1001 - FORGEJO_cors_ENABLED=true - FORGEJO_cors_ALLOW_DOMAIN="*" - FORGEJO_cors_METHODS="GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS" - FORGEJO_cors_ALLOW_CREDENTIALS=false volumes: - - /etc/timezone:/etc/timezone:ro - - /etc/localtime:/etc/localtime:ro - - /woodpecker/src/git.batsense.net/realaravinth/forgejo-notifications-core:/data/gitea/conf/app.ini + - /woodpecker/src/git.batsense.net/realaravinth/forgejo-notifications-core:/data/gitea/conf/ci/app.ini diff --git a/integration/conf/app.ini b/integration/conf/app.ini index b9a8712..6c50837 100644 --- a/integration/conf/app.ini +++ b/integration/conf/app.ini @@ -1,3 +1,8 @@ +APP_NAME = Forgejo:+Beyond+Coding+We+Forge +RUN_USER = git +WORK_PATH = /data/gitea +RUN_MODE = prod + [cors] ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -29,3 +34,76 @@ HEADERS = Content-Type,User-Agent [federation] ENABLED = true + +[database] +DB_TYPE = sqlite3 +HOST = localhost:3306 +NAME = forgejo +USER = root +PASSWD = +SCHEMA = +SSL_MODE = disable +PATH = /data/gitea/gitea.db +LOG_SQL = false + +[repository] +ROOT = /data/git/repositories + +[server] +SSH_DOMAIN = localhost:3000 +DOMAIN = localhost:3000 +HTTP_PORT = 3000 +ROOT_URL = http://localhost:3000/ +APP_DATA_PATH = /data/gitea/data +DISABLE_SSH = false +SSH_PORT = 22 +LFS_START_SERVER = true +LFS_JWT_SECRET = P0LeRSoFLTlw8oR4KIfkYxj0iPD6hP91a_VCIct_YW4 +OFFLINE_MODE = false + +[lfs] +PATH = /data/git/lfs + +[mailer] +ENABLED = false + +[service] +REGISTER_EMAIL_CONFIRM = false +ENABLE_NOTIFY_MAIL = false +DISABLE_REGISTRATION = false +ALLOW_ONLY_EXTERNAL_REGISTRATION = false +ENABLE_CAPTCHA = false +REQUIRE_SIGNIN_VIEW = false +DEFAULT_KEEP_EMAIL_PRIVATE = false +DEFAULT_ALLOW_CREATE_ORGANIZATION = true +DEFAULT_ENABLE_TIMETRACKING = true +NO_REPLY_ADDRESS = noreply.localhost + +[openid] +ENABLE_OPENID_SIGNIN = true +ENABLE_OPENID_SIGNUP = true + +[cron.update_checker] +ENABLED = false + +[session] +PROVIDER = file + +[log] +MODE = console +LEVEL = info +ROOT_PATH = /data/gitea/log + +[repository.pull-request] +DEFAULT_MERGE_STYLE = merge + +[repository.signing] +DEFAULT_TRUST_MODEL = committer + +[security] +INSTALL_LOCK = true +INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE2OTUwNTk0MDB9.kEvkrCByZx5i6dqNKE-KrYlmSvkMWjFPXUIdelEqcII +PASSWORD_HASH_ALGO = pbkdf2 + +[oauth2] +JWT_SECRET = A0Js-ebR-1DEIwL0KAPDiE1Ohw0S-FV3bYvNgAFFCrM diff --git a/integration/conf/ci/app.ini b/integration/conf/ci/app.ini new file mode 100644 index 0000000..214f550 --- /dev/null +++ b/integration/conf/ci/app.ini @@ -0,0 +1,109 @@ +APP_NAME = Forgejo:+Beyond+Coding+We+Forge +RUN_USER = git +WORK_PATH = /data/gitea +RUN_MODE = prod + +[cors] +; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; ; +; ; More information about CORS can be found here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#The_HTTP_response_headers +; ; enable cors headers (disabled by default) +ENABLED = true +; ; +; ; scheme of allowed requests +; SCHEME = http +; ; +; ; list of requesting domains that are allowed +ALLOW_DOMAIN = * +; ; +; ; allow subdomains of headers listed above to request +; ALLOW_SUBDOMAIN = false +; ; +; ; list of methods allowed to request +METHODS = GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS +; ; +; ; max time to cache response +; MAX_AGE = 10m +; ; +; ; allow request with credentials +ALLOW_CREDENTIALS = true +; ; +; ; headers to permit +HEADERS = Content-Type,User-Agent + +[federation] +ENABLED = true + +[database] +DB_TYPE = sqlite3 +HOST = localhost:3306 +NAME = forgejo +USER = root +PASSWD = +SCHEMA = +SSL_MODE = disable +PATH = /data/gitea/gitea.db +LOG_SQL = false + +[repository] +ROOT = /data/git/repositories + +[server] +SSH_DOMAIN = forgejo:3000 +DOMAIN = forgejo:3000 +HTTP_PORT = 3000 +ROOT_URL = http://forgejo:3000/ +APP_DATA_PATH = /data/gitea/data +DISABLE_SSH = false +SSH_PORT = 22 +LFS_START_SERVER = true +LFS_JWT_SECRET = P0LeRSoFLTlw8oR4KIfkYxj0iPD6hP91a_VCIct_YW4 +OFFLINE_MODE = false + +[lfs] +PATH = /data/git/lfs + +[mailer] +ENABLED = false + +[service] +REGISTER_EMAIL_CONFIRM = false +ENABLE_NOTIFY_MAIL = false +DISABLE_REGISTRATION = false +ALLOW_ONLY_EXTERNAL_REGISTRATION = false +ENABLE_CAPTCHA = false +REQUIRE_SIGNIN_VIEW = false +DEFAULT_KEEP_EMAIL_PRIVATE = false +DEFAULT_ALLOW_CREATE_ORGANIZATION = true +DEFAULT_ENABLE_TIMETRACKING = true +NO_REPLY_ADDRESS = noreply.forgejo + +[openid] +ENABLE_OPENID_SIGNIN = true +ENABLE_OPENID_SIGNUP = true + +[cron.update_checker] +ENABLED = false + +[session] +PROVIDER = file + +[log] +MODE = console +LEVEL = info +ROOT_PATH = /data/gitea/log + +[repository.pull-request] +DEFAULT_MERGE_STYLE = merge + +[repository.signing] +DEFAULT_TRUST_MODEL = committer + +[security] +INSTALL_LOCK = true +INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE2OTUwNTk0MDB9.kEvkrCByZx5i6dqNKE-KrYlmSvkMWjFPXUIdelEqcII +PASSWORD_HASH_ALGO = pbkdf2 + +[oauth2] +JWT_SECRET = A0Js-ebR-1DEIwL0KAPDiE1Ohw0S-FV3bYvNgAFFCrM