Compare commits

..
Author SHA1 Message Date
autonomic-bot 478d7a3137 chore: merge upstream main (BREAKING CHANGE: remove forgejo) into upgrade branch
cc-ci/testme cc-ci: success
The upgrade branch was cut before upstream's forgejo removal, so its tree (and the
!testme run that verified it) did not reflect what would actually deploy. Merging
upstream in brings the branch current; the gitea 1.27.1-rootless bump — which fixes
CVE-2026-60004 and CVE-2026-59774 (both CVSS 9.8) — is unchanged.
2026-08-10 16:24:51 +00:00
autonomic-bot 3087f09180 chore: upgrade gitea to 1.27.1-rootless
cc-ci/testme cc-ci: success
2026-08-03 23:48:26 +00:00
autonomic-bot 482e152b23 chore: upgrade gitea to 1.27.0-rootless
cc-ci/testme cc-ci: success
2026-07-24 04:07:59 +00:00
autonomic-bot ade6db5133 chore: upgrade gitea to 1.26.4-rootless
cc-ci/testme cc-ci: success
2026-07-13 20:12:13 +00:00
notplants 37ebd22ba4 Merge pull request 'BREAKING CHANGE: remove forgejo' (#58) from remove-forgejo into master
Reviewed-on: https://git.coopcloud.tech/coop-cloud/gitea/pulls/58
Reviewed-by: 3wordchant <3+3wordchant@noreply.git.coopcloud.tech>
2026-07-07 21:11:52 +00:00
notplants 4c330eb4a4 Merge branch 'master' into remove-forgejo 2026-07-07 21:11:31 +00:00
f 57e224c5b0 doc: release notes 2026-06-25 16:48:12 -03:00
autonomic-bot 7561bed6e1 chore: upgrade gitea to 1.26.4-rootless
cc-ci/testme cc-ci: success
2026-06-22 21:20:16 +00:00
notplants 0ab323d24a Merge pull request 'chore: upgrade gitea to 1.26.2-rootless, postgres to 15.18' (#60) from upgrade-273d214 into master
Reviewed-on: https://git.coopcloud.tech/coop-cloud/gitea/pulls/60
2026-06-22 19:41:31 +00:00
notplants 2f7f1b6bfe chore: upgrade gitea to 1.26.2-rootless, postgres to 15.18
cc-ci/testme cc-ci: success
2026-06-22 19:29:08 +00:00
f 6a0339d3f2 BREAKING CHANGE: remove forgejo 2026-06-16 18:33:21 -03:00
notplants ce4de9e645 Merge pull request 'feat: support Git LFS on plain gitea' (#57) from lfs into master
Reviewed-on: https://git.coopcloud.tech/coop-cloud/gitea/pulls/57
Reviewed-by: ammaratef45 <ammaratef45@proton.me>
2026-06-15 21:08:52 +00:00
notplants 357926f26e feat: support Git LFS on plain gitea
cc-ci/testme cc-ci: success
Add an opt-in compose.lfs.yml that mounts the lfs_jwt_secret secret and
enables GITEA_LFS_START_SERVER for plain gitea (forgejo already bundles
LFS). Emit LFS_JWT_SECRET in app.ini whenever the LFS server is on so the
JWT secret is stable across redeploys instead of being regenerated on
every restart (app.ini is a read-only config mount).

Bump version 3.5.2 -> 3.6.0.
2026-06-15 19:33:03 +00:00
notplants e6a1cc79e9 Merge pull request 'change deploy logic to stop-first instead of start-first' (#53) from stop-first into master
Reviewed-on: https://git.coopcloud.tech/coop-cloud/gitea/pulls/53
2026-06-04 16:47:00 +00:00
notplants 34dd04ac99 Merge branch 'master' into stop-first 2026-06-04 16:46:28 +00:00
ammaratef45 6aa52c1e73 fix abra command in documentation 2026-05-19 03:43:34 +00:00
notplants e7c4999f78 bump version number to 3.5.3 2026-05-18 12:59:07 -04:00
notplants c63e1cdd04 change deploy logic to stop-first instead of start-first 2026-05-18 12:51:20 -04:00
3wc db92e97071 docs: Fix broken README links, appease markdown linter 2026-01-08 21:29:48 -05:00
p4u1 d86d742ed1 Adds missing access controll headers 2025-10-27 18:29:54 +01:00
f 989294173e chore: publish 3.5.2+1.24.2-rootless release 2025-09-01 07:44:54 -03:00
f 4e789bf977 fix: forgejo 12.0.2 2025-09-01 07:38:52 -03:00
f 485fa32512 chore: publish 3.5.1+1.24.2-rootless release 2025-07-26 01:35:54 -03:00
f 54fd30f38a fix: forgejo 12.0.1 2025-07-26 01:33:48 -03:00
f 6d586f6ad3 chore: publish 3.5.0+1.24.2-rootless release 2025-07-19 11:42:35 -03:00
f 8c9793ace9 feat: upgrade to forgejo 12 2025-07-19 11:41:41 -03:00
3wordchant 4cfc2ac2e0 chore: publish 3.4.0+1.24.2-rootless release 2025-06-25 18:34:34 +01:00
f ca4733a0b0 fix: upgrade forgejo to 11.0.2 2025-06-19 10:26:08 -03:00
fauno 5a65ef04c5 Merge pull request 'feat: forgejo 11' (#45) from forgejo into master
Reviewed-on: https://git.coopcloud.tech/coop-cloud/gitea/pulls/45
2025-06-19 13:21:57 +00:00
3wordchant 270ed7bb93 chore: publish 3.3.1+1.23.8-rootless release 2025-05-16 20:54:29 +02:00
3wordchant b2c9d95e60 Merge pull request 'fix: security release' (#44) from upgrade into master
Reviewed-on: https://git.coopcloud.tech/coop-cloud/gitea/pulls/44
2025-05-16 18:53:40 +00:00
3wordchant 88b226f713 Merge branch 'master' into upgrade 2025-05-16 18:53:32 +00:00
f 94af9cea9e feat: forgejo 11 2025-05-15 14:36:29 -03:00
fauno 85dcf3a0b1 Merge pull request 'forgejo upgrade' (#41) from forgejo into master
Reviewed-on: https://git.coopcloud.tech/coop-cloud/gitea/pulls/41
Reviewed-by: decentral1se <decentral1se@noreply.git.coopcloud.tech>
2025-05-15 17:27:24 +00:00
f 3840e87f2f fix: security release
https://blog.gitea.com/release-of-1.23.8/
2025-05-15 14:24:52 -03:00
f 777aad5da4 Merge branch 'master' into forgejo 2025-05-15 14:22:53 -03:00
fauno 5350ce207f Merge pull request 'feat: lfs server' (#42) from lfs into master
Reviewed-on: https://git.coopcloud.tech/coop-cloud/gitea/pulls/42
2025-05-15 17:22:06 +00:00
cas 2bfec14654 Update .drone.yml 2025-04-10 10:50:49 -07:00
f b44e18f063 feat: configuration by forge 2025-02-20 09:17:58 -03:00
f 77624221b4 feat: lfs server 2025-02-18 15:44:59 -03:00
f ce632c8e5f Merge branch 'master' of https://git.coopcloud.tech/coop-cloud/gitea 2025-02-13 12:29:31 -03:00
f cac5c8d694 feat: upgrade to forgejo 10.0.1 2025-02-13 12:29:09 -03:00
knoflook cf2298162d chore: publish 3.3.0+1.23.1-rootless release 2025-02-12 14:35:34 +01:00
knoflook 0bbac9ed9c feat: refresh token validity 2025-02-12 14:34:11 +01:00
f 8ffd4d33be chore: publish 3.2.0+1.23.1-rootless release 2025-01-21 10:23:43 -03:00
f 7364f0b87c feat: update forgejo to version 10.0.0 2025-01-21 10:23:08 -03:00
Javielico 1619c333c3 chore: publish 3.1.1+1.23.1-rootless release 2025-01-18 15:14:06 +00:00
Javielico 6d681457f8 chore: publish 3.1.0+1.23.0-rootless release 2025-01-18 15:13:22 +00:00
3wordchant b2087cf373 chore: publish 3.0.3+1.22.6-rootless release 2025-01-15 12:09:07 -05:00
3wordchant 1418946974 Whoops, typo 😳 2025-01-14 17:37:38 -05:00
3wordchant 407e587646 chore: publish 3.0.2+1.22.6-rootless release 2025-01-08 12:56:24 -05:00
fauno b4fdbfdbbb Merge pull request 'feat: toggle push to create' (#40) from push-to-create into master
Reviewed-on: https://git.coopcloud.tech/coop-cloud/gitea/pulls/40
Reviewed-by: decentral1se <decentral1se@noreply.git.coopcloud.tech>
2025-01-08 12:53:04 +00:00
fauno 544935a5e6 Merge pull request 'feat: sqlite3 support' (#37) from sqlite3 into master
Reviewed-on: https://git.coopcloud.tech/coop-cloud/gitea/pulls/37
2025-01-07 20:14:28 +00:00
fauno e45aee2257 Merge pull request 'feat: upgrade forgejo' (#38) from forgejo into master
Reviewed-on: https://git.coopcloud.tech/coop-cloud/gitea/pulls/38
Reviewed-by: decentral1se <decentral1se@noreply.git.coopcloud.tech>
2025-01-07 20:14:12 +00:00
fauno e313c82857 Merge pull request 'feat: support other smtp protocols' (#39) from smtp into master
Reviewed-on: https://git.coopcloud.tech/coop-cloud/gitea/pulls/39
Reviewed-by: decentral1se <decentral1se@noreply.git.coopcloud.tech>
2025-01-07 20:12:17 +00:00
f fb45547f0d fix: provide default 2025-01-07 14:26:12 -03:00
f ace3ff1b4a feat: toggle push to create 2025-01-07 13:43:02 -03:00
f b84edcbe75 feat: support other smtp protocols 2025-01-07 13:35:01 -03:00
f 25fd554ab7 feat: upgrade forgejo 2025-01-07 13:31:59 -03:00
f b4273a95e3 feat: sqlite3 support 2025-01-07 13:30:03 -03:00
3wordchant daf4a26f72 chore: publish 3.0.1+1.22.3-rootless release 2024-10-30 13:36:29 -04:00
3wordchant 7fec94eaec chore: publish 3.0.0+1.22.2-rootless release 2024-10-30 13:25:04 -04:00
Moritz 0bfb666dd0 chore: publish 2.11.0+1.22.2-rootless release 2024-10-29 13:55:44 +01:00
Moritz 2554109fab update forgejo to version 9.0.1 2024-10-29 13:55:32 +01:00
Moritz bd57d6121b update backupbot label 2024-10-24 17:01:04 +02:00
3wordchant cae11a78e6 chore: publish 2.10.1+1.22.2-rootless release 2024-10-02 14:01:17 -04:00
Javielico 8e8809fd07 chore: publish 2.10.0+1.22.1-rootless release 2024-08-23 19:21:01 +01:00
Moritz 24e4b09b07 chore: publish 2.9.1+1.22.0-rootless release 2024-08-15 12:25:05 +02:00
Moritz 43d43fb2b7 fix APP_INI_VERSION 2024-08-15 12:24:30 +02:00
3wordchant c5dada903e chore: publish 2.9.0+1.22.0-rootless release 2024-07-03 14:26:42 -04:00
Moritz 9687f7f738 chore: publish 2.8.0+1.21.11-rootless release 2024-05-13 16:20:13 +02:00
Moritz 92073fbba5 fix backup label 2024-04-30 15:18:21 +02:00
Moritz f26296ba5c add backup label 2024-04-29 15:24:13 +02:00
Javielico baacc575c2 chore: publish 2.7.0+1.21.11-rootless release 2024-04-24 21:03:14 +01:00
javielico 53ffe86350 Merge pull request 'Adding more variable configs' (#36) from javielico/gitea:master into master
Reviewed-on: https://git.coopcloud.tech/coop-cloud/gitea/pulls/36
Reviewed-by: decentral1se <decentral1se@noreply.git.coopcloud.tech>
2024-04-24 10:01:46 +00:00
Javielico dbde635976 Removing access log to false as fallback has been removed on Gitea 1.21 2024-04-23 21:45:55 +01:00
Javielico 2b15ff9c28 Added components to app.ini 2024-04-23 16:13:28 +01:00
Javielico 94de0096fc Adding DISABLE_AUTH 2024-04-18 19:01:32 +01:00
Javielico e0d73083e2 Adding variable configs 2024-04-14 20:48:18 +01:00
decentral1se ced3ea7978 chore: publish 2.6.2+1.21.10-rootless release 2024-04-01 17:05:17 +02:00
decentral1se 43abfe0483 chore: publish 2.6.1+1.21.10-rootless release 2024-04-01 16:38:05 +02:00
decentral1se 4683a81eeb Merge pull request 'feat: enable indexer for search' (#33) from indexer into master
Reviewed-on: https://git.coopcloud.tech/coop-cloud/gitea/pulls/33
2024-04-01 11:58:54 +00:00
decentral1se ea7e26698a feat: enable indexer for search [ci skip]
See https://git.coopcloud.tech/coop-cloud/organising/issues/589
2024-03-31 01:31:39 +01:00
3wordchant 3815417c2c chore: publish 2.6.0+1.21.5-rootless release 2024-03-30 16:07:28 -03:00
3wordchant 4421f81a35 Add healthcheck, update metadata 2024-03-30 16:05:32 -03:00
3wordchant a0e8ba4839 chore: publish 2.5.2+1.21.5-rootless release 2024-02-08 14:36:08 -03:00
3wordchant ca9d0b4a6c chore: publish 2.5.1+1.21.4-rootless release 2024-01-17 17:56:28 -03:00
cas 9d44d9e61c add [repository.upload] support to the configuration
Note: Requires updates to config file so add this to the release notes.
2023-12-07 18:01:05 -08:00
cas 464c890afb Add LANDING_PAGE support for configuration 2023-12-07 17:47:53 -08:00
knoflook c8ea2ddf0c chore: publish 2.5.0+1.21.1-rootless release 2023-11-27 13:10:23 +01:00
3wordchant b0ce473627 chore: publish 2.4.0+1.21.0-rootless release 2023-11-20 12:43:42 +00:00
3wordchant 73970dd79c chore: publish 2.3.3+1.20.5-rootless release 2023-10-30 12:43:03 +00:00
3wordchant 9153c4db2a chore: publish 2.3.2+1.20.3-rootless release 2023-08-28 14:08:11 +02:00
3wordchant b95eae3b57 chore: publish 2.3.1+1.20.1-rootless release 2023-07-25 12:53:45 +01:00
3wordchant d18379a364 Bump APP_INI_VERSION 2023-07-25 12:52:59 +01:00
3wordchant 46bb242fe7 chore: publish 2.3.0+1.20.1-rootless release 2023-07-25 12:50:30 +01:00
Philipp Rothmann f9249f1284 chore: publish 2.2.0+1.19.3-rootless release 2023-06-06 17:31:14 +02:00
Philipp Rothmann 9fe02cb19f reduce logging verbosity 2023-06-06 16:19:52 +02:00
javielico 1e612d84a2 Merge pull request 'Updated images for MariaDB/Gitea and Postgres to latest stable or LTS' (#31) from javielico/gitea:master into master
Reviewed-on: https://git.coopcloud.tech/coop-cloud/gitea/pulls/31
2023-05-18 10:36:25 +00:00
Javielico 77dd223f94 Added commit message warning about Pgsql upgrade 2023-05-09 20:31:17 +01:00
Javielico d5577a0f75 Mariadb to stable lts 10.11.2 2023-05-08 21:03:09 +01:00
Javielico 8f5587099d Postgres up to 15.2 2023-05-08 21:01:16 +01:00
Javielico d56a1474fe Gitea up to latest stable 1.19.3 2023-05-08 20:58:58 +01:00
javielico dc3f54d5ea Merge pull request 'master' (#1) from coop-cloud/gitea:master into master
Reviewed-on: https://git.coopcloud.tech/javielico/gitea/pulls/1
2023-05-08 19:47:16 +00:00
cas 8b466acf66 chore: publish 2.1.0+1.18.5-rootless release 2023-03-15 13:18:39 -07:00
3wordchant 9cf26a0154 Switch to thecoopcloud/stack-ssh-deploy 2023-01-20 23:31:14 -08:00
3wordchant a04fe41c1b Specify mariadb for tests 2023-01-20 22:38:13 -08:00
3wordchant 63118ecbd8 Fix CI by adding networks: [mass update] 2023-01-20 22:32:13 -08:00
3wordchant cd0fff667a Automatically generate catalogue on release [mass update]
Re: coop-cloud/recipes-catalogue-json#4
2023-01-20 22:32:13 -08:00
Philipp Rothmann 9413c79e8f chore: publish 2.0.1+1.18.2-rootless release 2023-01-20 11:00:24 +01:00
Philipp Rothmann 7d7761dec6 feat: add forgejo overwrite 2023-01-20 10:55:04 +01:00
Philipp Rothmann 936fb940cb Revert "fix: drop db_password from main compose def"
This reverts commit 89400089ec.

db_password secret is still needed in app service to set the db
secret in app.ini.tmpl
2023-01-20 10:50:35 +01:00
3wordchant e2cd36873c Update abra syntax in examples (finally) [mass update] 2023-01-19 16:27:03 -08:00
decentral1se 89400089ec fix: drop db_password from main compose def
Now available in mariadb/postgresql compose files.
2023-01-17 10:45:19 +01:00
Philipp Rothmann 1ea412525f chore: publish 2.0.0+1.18.0-rootless release 2023-01-09 17:02:07 +01:00
Philipp Rothmann 910dac0c1b add: postgresdb alternative 2023-01-09 16:54:54 +01:00
3wordchant f7ee9b63c4 Add optional CORS headers 2023-01-08 19:12:53 -08:00
3wordchant a1dde38834 Switch to <recipe>.example.com 2022-11-24 10:53:27 -08:00
decentral1se f35689989c Merge pull request 'Adding Oauth2 options and up on versions' (#29) from javielico/gitea:master into master
Reviewed-on: https://git.coopcloud.tech/coop-cloud/gitea/pulls/29
2022-11-13 21:54:01 +00:00
javielico 1d4dc8e8bb Bump version up on compose.yml 2022-11-13 00:45:23 +00:00
javielico f85eaed26e Adding GITEA_OAUTH2_CLIENT_ENABLED to compose.yml and .env.sample 2022-11-11 16:47:52 +00:00
javielico fbb36d5598 Up versions of gitea and mariadb 2022-11-11 16:15:34 +00:00
javielico 13c8af2356 Version bump 2022-11-11 16:11:33 +00:00
javielico a4cddb7b09 Adding vars to compose.yml 2022-11-11 16:10:38 +00:00
javielico daf24d521f Adding variables to .env.sample 2022-11-11 16:09:27 +00:00
javielico b92ad0d45c Add oauth2_client options 2022-11-11 16:04:33 +00:00
decentral1se af97db8082 chore: publish 1.3.0+1.17.2-rootless release 2022-09-07 14:45:39 +02:00
decentral1se cd39f5fc82 chore: publish 1.2.1+1.16.8-rootless release 2022-06-01 09:46:21 +02:00
appletalk aa84c25a83 Bump app.ini version in abra.sh 2022-05-01 02:39:58 +00:00
appletalk cd3ded3c4e Add disable_gravatar and federated_avatar 2022-04-28 17:50:51 -07:00
decentral1se 0cad878de5 use domain env var 2022-03-27 21:08:50 +02:00
decentral1se 3a47a4164e chore: publish 1.2.0+1.16.3-rootless release 2022-03-09 12:01:02 +01:00
cellarspoon 8ead189fde chore: publish 1.1.3+1.15.10-rootless release 2022-01-18 10:26:40 +01:00
cellarspoon c8ea311d7d fix: point to new drone instance [ci skip] 2021-12-31 16:31:34 +01:00
Léo b2f29bc99e docs(README): how to enable SSH 2021-12-31 13:51:29 +01:00
Léo 741b8701e5 docs(README): correct command creating new user 2021-12-31 13:51:29 +01:00
3wordchant bb1f0f082e Merge pull request 'docs(README): instruction to create first user' (#24) from aileoia/gitea:master into master
Reviewed-on: https://git.coopcloud.tech/coop-cloud/gitea/pulls/24
2021-12-29 19:31:41 +00:00
Léo cec9c2c061 docs(README): instruction to create first user 2021-12-29 18:13:43 +01:00
3wordchant fee8fd5342 Goodbye, emojis! 😢
[ci skip]
2021-11-23 12:19:04 +02:00
3wordchant 83a9e9da6b chore: fix README bullet formatting
[ci skip]
2021-11-22 13:42:03 +02:00
3wordchant ee34764179 Update metadata
[ci skip]
2021-11-21 21:51:51 +02:00
3wordchant d0488d3a61 Add preliminary backups 2021-11-21 21:51:11 +02:00
decentral1se 7009473b38 chore: release patch version 2021-11-02 21:45:37 +01:00
17 changed files with 409 additions and 59 deletions
+16 -6
View File
@@ -3,17 +3,21 @@ kind: pipeline
name: deploy to swarm-test.autonomic.zone
steps:
- name: deployment
image: decentral1se/stack-ssh-deploy:latest
image: thecoopcloud/stack-ssh-deploy:latest
settings:
host: swarm-test.autonomic.zone
stack: gitea
networks:
- proxy
generate_secrets: true
purge: true
deploy_key:
from_secret: drone_ssh_swarm_test
compose: "compose.yml:compose.mariadb.yml"
environment:
APP_INI_VERSION: v1
DOCKER_SETUP_SH_VERSION: v1
PG_BACKUP_VERSION: v1
DOMAIN: gitea.swarm-test.autonomic.zone
GITEA_ALLOW_ONLY_EXTERNAL_REGISTRATION: true
GITEA_APP_NAME: Git with solidaritea
@@ -37,11 +41,17 @@ trigger:
- master
---
kind: pipeline
name: recipe release
name: generate recipe catalogue
steps:
- name: release a new version
image: thecoopcloud/drone-abra:latest
image: plugins/downstream
settings:
command: recipe gitea release
deploy_key:
from_secret: abra_bot_deploy_key
server: https://build.coopcloud.tech
token:
from_secret: drone_abra-bot_token
fork: true
repositories:
- toolshed/auto-recipes-catalogue-json
trigger:
event: tag
+52 -2
View File
@@ -2,6 +2,16 @@ TYPE=gitea
DOMAIN=gitea.example.com
LETS_ENCRYPT_ENV=production
COMPOSE_FILE="compose.yml"
ENABLE_BACKUPS=true
COMPOSE_FILE="$COMPOSE_FILE:compose.mariadb.yml"
# COMPOSE_FILE="$COMPOSE_FILE:compose.sqlite3.yml"
# COMPOSE_FILE="$COMPOSE_FILE:compose.postgres.yml"
# Enable Git LFS on plain gitea (not needed with forgejo, which bundles it).
# Mounts the lfs_jwt_secret secret and sets GITEA_LFS_START_SERVER=true.
# COMPOSE_FILE="$COMPOSE_FILE:compose.lfs.yml"
# SECRET_LFS_JWT_SECRET_VERSION=v1 # length=43
GITEA_DOMAIN=git.example.com
GITEA_ALLOW_ONLY_EXTERNAL_REGISTRATION=true
@@ -11,6 +21,26 @@ GITEA_DISABLE_REGISTRATION=false
GITEA_ENABLE_NOTIFY_MAIL=true
GITEA_ENABLE_OPENID_SIGNIN=true
GITEA_ENABLE_OPENID_SIGNUP=true
GITEA_DISABLE_GRAVATAR=false
GITEA_ENABLE_FEDERATED_AVATAR=true
GITEA_LANDING_PAGE=organizations
GITEA_SHOW_USER_EMAIL=false
GITEA_DISABLE_REGULAR_ORG_CREATION=true
GITEA_DEFAULT_KEEP_EMAIL_PRIVATE=true
GITEA_DEFAULT_ALLOW_CREATE_ORGANIZATION=false
GITEA_ENABLE_USER_HEATMAP=false
GITEA_DEFAULT_USER_VISIBILITY=limited
GITEA_ALLOWED_USER_VISIBILITY_MODES=limited,private
GITEA_DEFAULT_ORG_VISIBILITY=limited
GITEA_REQUIRE_SIGNIN_VIEW=true
GITEA_ENABLE_PUSH_CREATE_USER=false
GITEA_ENABLE_PUSH_CREATE_ORG=false
GITEA_LFS_START_SERVER=false
GITEA_REPO_UPLOAD_ENABLED=true
GITEA_REPO_UPLOAD_ALLOWED_TYPES=*/*
GITEA_REPO_UPLOAD_MAX_SIZE=50
GITEA_REPO_UPLOAD_MAX_FILES=5
GITEA_MAILER_FROM=noreply@example.com
GITEA_MAILER_USER=noreply@example.com
@@ -25,7 +55,27 @@ SECRET_JWT_SECRET_VERSION=v1 # length=43
SECRET_SECRET_KEY_VERSION=v1 # length=64
# SMTP Mailer
# COMPOSE_FILE="compose.yml:compose.smtp.yml"
# COMPOSE_FILE="$COMPOSE_FILE:compose.smtp.yml"
# GITEA_SMTP_MAILER_ENABLED=1
# GITEA_MAILER_HOST=mail.gandi.net:465
# GITEA_MAILER_ADDR=mail.gandi.net
# GITEA_MAILER_PORT=465
# SECRET_SMTP_PASSWORD_VERSION=v1
# GITEA_MAILER_PROTOCOL=smtps
# OATH2 Options
# GITEA_REGISTER_EMAIL_CONFIRM=replace-me
# GITEA_REGISTER_EMAIL_CONFIRM=replace-me
# GITEA_OAUTH2_USERNAME=replace-me
# GITEA_UPDATE_AVATAR=replace-me
# GITEA_ACCOUNT_LINKING=replace-me
# GITEA_OAUTH2_CLIENT_ENABLED=replace-me
# Lifetime of an OAuth2 refresh token in hours, prolly no need to edit. We
# were hitting issues with infrequently pushed to repos that were not picked
# up by drone after a month of inactivity, hence the option.
# GITEA__oauth2__REFRESH_TOKEN_EXPIRATION_TIME=730
# Indexer (for issue search)
# GITEA_REPO_INDEXER_ENABLED=false
# GITEA_ISSUE_INDEXER_TYPE=db
# GITEA_STARTUP_TIMEOUT=-1
+61 -14
View File
@@ -1,26 +1,73 @@
# Gitea
[![Build Status](https://drone.coopcloud.tech/api/badges/coop-cloud/gitea/status.svg)](https://drone.coopcloud.tech/coop-cloud/gitea)
[![Build Status](https://build.coopcloud.tech/api/badges/coop-cloud/gitea/status.svg)](https://build.coopcloud.tech/coop-cloud/gitea)
<!-- metadata -->
- **Category**: Development
- **Status**: ❷💛
- **Image**: [`gitea/gitea`](https://hub.docker.com/gitea/gitea), ❶💚, upstream
- **Healthcheck**: Yes
- **Backups**: No
- **Email**: ?
- **Tests**: ❷💛
- **SSO**: ❶💚 (OAuth)
* **Category**: Development
* **Status**: 5
* **Image**: [`gitea/gitea`](https://hub.docker.com/gitea/gitea), 4, upstream
* **Healthcheck**: Yes
* **Backups**: Yes
* **Email**: Yes
* **Tests**: 2
* **SSO**: 3 (OAuth)
<!-- endmetadata -->
## Basic usage
1. Set up Docker Swarm and [`abra`][abra]
1. [Set up Docker Swarm and `abra`][operators-tutorial]
2. Deploy [`coop-cloud/traefik`][cc-traefik]
3. `abra app new gitea --secrets` (optionally with `--pass` if you'd like
to save secrets in `pass`)
4. `abra app YOURAPPDOMAIN config` - be sure to change `$DOMAIN` to something that resolves to
4. `abra app config YOURAPPDOMAIN` - be sure to change `$DOMAIN` to something that resolves to
your Docker swarm box
5. `abra app YOURAPPDOMAIN deploy`
5. `abra app deploy YOURAPPDOMAIN`
[operators-tutorial]: https://docs.coopcloud.tech/operators/tutorial/
[cc-traefik]: https://git.coopcloud.tech/coop-cloud/traefik/
## Create first user
Run
```bash
abra app run YOURAPPNAME app -- gitea -c /etc/gitea/app.ini admin user create --username USERNAME --admin --random-password --email EMAIL
```
See the [Gitea command-line documentation](https://docs.gitea.io/en-us/command-line/) for more options. Make sure not to forget the `-c /etc/gitea/app.ini`.
## Enable SSH
You most certainly want to be able to access your repository over SSH. To do so, make sure you uncomment the right lines in the configuration for `traefik`.
```sh
abra app config YOURTRAEFIKAPP
```
There uncomment or add these lines:
```sh
GITEA_SSH_ENABLED=1
COMPOSE_FILE="compose.yml:compose.gitea.yml"
```
Then redeploy traefik:
```sh
abra app undeploy YOURTRAEFIKAPP
abra app deploy YOURTRAEFIKAPP
```
You might need to wait a bit. To check if it worked, you can run
```sh
telnet my.gitea.example.com 2222
```
Once you have added a public SSH key, you can check that you can connect to your gitea server with
```sh
ssh -T -p 2222 git@my.gitea.example.com
```
Note that gitea should be configured to listen to port 2222, i.e. `GITEA_SSH_PORT=2222` in the gitea config.
+14 -1
View File
@@ -1,2 +1,15 @@
export APP_INI_VERSION=v7
export APP_INI_VERSION=v22
export DOCKER_SETUP_SH_VERSION=v1
export PG_BACKUP_VERSION=v1
abra_backup_app() {
_abra_backup_dir "app:/var/lib/gitea"
}
abra_backup_db() {
_abra_backup_mysql "db" "gitea"
}
abra_backup() {
abra_backup_app && abra_backup_db
}
+56 -4
View File
@@ -2,16 +2,32 @@ APP_NAME = {{ env "GITEA_APP_NAME" }}
[database]
DB_TYPE = {{ env "GITEA_DB_TYPE" }}
{{ if ne (env "GITEA_DB_TYPE") "sqlite3" }}
HOST = {{ env "GITEA_DB_HOST" }}
NAME = {{ env "GITEA_DB_NAME" }}
PASSWD = {{ secret "db_password" }}
USER = {{ env "GITEA_DB_USER" }}
{{ else }}
SQLITE_JOURNAL_MODE = {{ env "GITEA_SQLITE_JOURNAL_MODE" }}
PATH = {{ env "GITEA_PATH" }}
{{ end }}
[picture]
DISABLE_GRAVATAR = {{ env "GITEA_DISABLE_GRAVATAR" }}
ENABLE_FEDERATED_AVATAR = {{ env "GITEA_ENABLE_FEDERATED_AVATAR" }}
[service]
ALLOW_ONLY_EXTERNAL_REGISTRATION = {{ env "GITEA_ALLOW_ONLY_EXTERNAL_REGISTRATION" }}
AUTO_WATCH_NEW_REPOS = {{ env "GITEA_AUTO_WATCH_NEW_REPOS" }}
DISABLE_REGISTRATION = {{ env "GITEA_DISABLE_REGISTRATION" }}
ENABLE_NOTIFY_MAIL = {{ env "GITEA_ENABLE_NOTIFY_MAIL" }}
DEFAULT_KEEP_EMAIL_PRIVATE = {{ env "GITEA_DEFAULT_KEEP_EMAIL_PRIVATE" }}
DEFAULT_ALLOW_CREATE_ORGANIZATION = {{ env "GITEA_DEFAULT_ALLOW_CREATE_ORGANIZATION" }}
ENABLE_USER_HEATMAP = {{ env "GITEA_ENABLE_USER_HEATMAP" }}
DEFAULT_USER_VISIBILITY = {{ env "GITEA_DEFAULT_USER_VISIBILITY" }}
ALLOWED_USER_VISIBILITY_MODES = {{ env "GITEA_ALLOWED_USER_VISIBILITY_MODES" }}
DEFAULT_ORG_VISIBILITY = {{ env "GITEA_DEFAULT_ORG_VISIBILITY" }}
REQUIRE_SIGNIN_VIEW = {{ env "GITEA_REQUIRE_SIGNIN_VIEW" }}
[openid]
ENABLE_OPENID_SIGNIN = {{ env "GITEA_ENABLE_OPENID_SIGNIN" }}
@@ -19,18 +35,35 @@ ENABLE_OPENID_SIGNUP = {{ env "GITEA_ENABLE_OPENID_SIGNUP" }}
[repository]
DEFAULT_BRANCH = main
ENABLE_PUSH_CREATE_USER = {{ env "GITEA_ENABLE_PUSH_CREATE_USER" }}
ENABLE_PUSH_CREATE_ORG = {{ env "GITEA_ENABLE_PUSH_CREATE_ORG" }}
[repository.upload]
ENABLED = {{ env "GITEA_REPO_UPLOAD_ENABLED" }}
ALLOWED_TYPES = {{ env "GITEA_REPO_UPLOAD_ALLOWED_TYPES" }}
FILE_MAX_SIZE = {{ env "GITEA_REPO_UPLOAD_MAX_SIZE" }}
MAX_FILES = {{ env "GITEA_REPO_UPLOAD_MAX_FILES" }}
[ui]
SHOW_USER_EMAIL = {{ env "GITEA_SHOW_USER_EMAIL" }}
[indexer]
STARTUP_TIMEOUT = 0
REPO_INDEXER_ENABLED = {{ or (env "GITEA_REPO_INDEXER_ENABLED") "false" }}
ISSUE_INDEXER_TYPE= {{ or (env "GITEA_ISSUE_INDEXER_TYPE") "db" }}
STARTUP_TIMEOUT = {{ or (env "GITEA_STARTUP_TIMEOUT") "-1" }}
[server]
DOMAIN = {{ env "GITEA_DOMAIN" }}
LANDING_PAGE = organizations
LANDING_PAGE = {{ env "GITEA_LANDING_PAGE" }}
ROOT_URL = https://%(DOMAIN)s/
SSH_DOMAIN = {{ env "GITEA_DOMAIN" }}
SSH_LISTEN_PORT = {{ env "GITEA_SSH_PORT" }}
SSH_PORT = {{ env "GITEA_SSH_PORT" }}
START_SSH_SERVER = true
LFS_START_SERVER = {{ env "GITEA_LFS_START_SERVER" }}
{{ if (eq (env "GITEA_LFS_START_SERVER") "true") }}
LFS_JWT_SECRET = {{ secret "lfs_jwt_secret" }}
{{ end }}
[security]
INSTALL_LOCK = true
@@ -39,6 +72,9 @@ REVERSE_PROXY_LIMIT = 1
REVERSE_PROXY_TRUSTED_PROXIES = *
SECRET_KEY = {{ secret "secret_key" }}
[admin]
DISABLE_REGULAR_ORG_CREATION = {{ env "GITEA_DISABLE_REGULAR_ORG_CREATION" }}
[oauth2]
JWT_SECRET = {{ secret "jwt_secret" }}
@@ -46,11 +82,21 @@ JWT_SECRET = {{ secret "jwt_secret" }}
[mailer]
ENABLED = true
FROM = {{ env "GITEA_MAILER_FROM" }}
HOST = {{ env "GITEA_MAILER_HOST" }}
PROTOCOL = {{ env "GITEA_MAILER_PROTOCOL" }}
SMTP_ADDR = {{ env "GITEA_MAILER_ADDR" }}
SMTP_PORT = {{ env "GITEA_MAILER_PORT" }}
USER = {{ env "GITEA_MAILER_USER" }}
PASSWD = {{ secret "smtp_password" }}
MAILER_TYPE = smtp
IS_TLS_ENABLED = true
{{ end }}
{{ if eq (env "GITEA_OAUTH2_CLIENT_ENABLED") "1" }}
[oauth2_client]
REGISTER_EMAIL_CONFIRM = {{ env "GITEA_REGISTER_EMAIL_CONFIRM" }}
ENABLE_AUTO_REGISTRATION = {{ env "GITEA_ENABLE_AUTO_REGISTRATION" }}
USERNAME = {{ env "GITEA_OAUTH2_USERNAME" }}
UPDATE_AVATAR = {{ env "GITEA_UPDATE_AVATAR" }}
ACCOUNT_LINKING = {{ env "GITEA_ACCOUNT_LINKING" }}
{{ end }}
[markup.restructuredtext]
@@ -58,3 +104,9 @@ ENABLED = true
FILE_EXTENSIONS = .rst
RENDER_COMMAND = rst2html
IS_INPUT_FILE = false
[log]
MODE=console
LEVEL=WARN
STACKTRACE_LEVEL=None
ENABLE_XORM_LOG=false
+13
View File
@@ -0,0 +1,13 @@
version: "3.8"
services:
app:
environment:
- GITEA_LFS_START_SERVER=true
secrets:
- lfs_jwt_secret
secrets:
lfs_jwt_secret:
name: ${STACK_NAME}_lfs_jwt_secret_${SECRET_LFS_JWT_SECRET_VERSION}
external: true
+43
View File
@@ -0,0 +1,43 @@
version: '3.8'
services:
app:
environment:
- GITEA_DB_TYPE=mysql
- GITEA_DB_HOST="db:3306"
- GITEA_DB_NAME=gitea
- GITEA_DB_USER=gitea
secrets:
- db_password
db:
image: "mariadb:10.11.2"
deploy:
labels:
backupbot.backup.pre-hook: 'mysqldump --single-transaction -u root -p"$$(cat /run/secrets/db_root_password)" gitea > /var/lib/mysql/backup.sql'
backupbot.backup.volumes.mariadb.path: "backup.sql"
backupbot.restore.post-hook: "mariadb -u root -p\"$$(cat /run/secrets/db_root_password)\" gitea < /var/lib/mysql/backup.sql"
command: |
mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
- MYSQL_DATABASE=gitea
- MYSQL_USER=gitea
- MYSQL_PASSWORD_FILE=/run/secrets/db_password
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
secrets:
- db_password
- db_root_password
volumes:
- "mariadb:/var/lib/mysql"
networks:
- internal
secrets:
db_password:
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
external: true
db_root_password:
name: ${STACK_NAME}_db_root_password_${SECRET_DB_ROOT_PASSWORD_VERSION}
external: true
volumes:
mariadb:
+45
View File
@@ -0,0 +1,45 @@
version: '3.8'
services:
app:
environment:
- GITEA_DB_TYPE=postgres
- GITEA_DB_HOST="db:5432"
- GITEA_DB_NAME=gitea
- GITEA_DB_USER=gitea
secrets:
- db_password
db:
image: postgres:15.18
deploy:
labels:
backupbot.backup.pre-hook: "/pg_backup.sh backup"
backupbot.backup.volumes.db.path: "backup.sql"
backupbot.restore.post-hook: '/pg_backup.sh restore'
environment:
- POSTGRES_DB=gitea
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
secrets:
- db_password
volumes:
- db:/var/lib/postgresql/data
networks:
- internal
configs:
- source: pg_backup
target: /pg_backup.sh
mode: 0555
secrets:
db_password:
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
external: true
volumes:
db:
configs:
pg_backup:
name: ${STACK_NAME}_pg_backup_${PG_BACKUP_VERSION}
file: pg_backup.sh
+3 -1
View File
@@ -5,8 +5,10 @@ services:
app:
environment:
- GITEA_MAILER_FROM
- GITEA_MAILER_HOST
- GITEA_MAILER_ADDR
- GITEA_MAILER_PORT
- GITEA_MAILER_USER
- "GITEA_MAILER_PROTOCOL=${GITEA_MAILER_PROTOCOL:-smtps}"
secrets:
- smtp_password
+8
View File
@@ -0,0 +1,8 @@
version: '3.8'
services:
app:
environment:
- GITEA_DB_TYPE=sqlite3
- GITEA_SQLITE_JOURNAL_MODE=wal
- GITEA_PATH=/var/lib/gitea/gitea.db
+44 -31
View File
@@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: "gitea/gitea:1.15.3-rootless"
image: "gitea/gitea:1.27.1-rootless"
configs:
- source: app_ini
target: /etc/gitea/app.ini
@@ -11,7 +11,6 @@ services:
target: /usr/local/bin/docker-setup.sh
mode: 0555
secrets:
- db_password
- internal_token
- jwt_secret
- secret_key
@@ -19,10 +18,6 @@ services:
- GITEA_ALLOW_ONLY_EXTERNAL_REGISTRATION
- GITEA_APP_NAME
- GITEA_AUTO_WATCH_NEW_REPOS
- GITEA_DB_HOST="db:3306"
- GITEA_DB_NAME=gitea
- GITEA_DB_TYPE=mysql
- GITEA_DB_USER=gitea
- GITEA_DISABLE_REGISTRATION
- GITEA_DOMAIN=${DOMAIN}
- GITEA_ENABLE_NOTIFY_MAIL
@@ -30,6 +25,34 @@ services:
- GITEA_ENABLE_OPENID_SIGNUP
- GITEA_SMTP_MAILER_ENABLED
- GITEA_SSH_PORT
- GITEA_DISABLE_GRAVATAR
- GITEA_ENABLE_FEDERATED_AVATAR
- GITEA_REGISTER_EMAIL_CONFIRM
- GITEA_ENABLE_AUTO_REGISTRATION
- GITEA_OAUTH2_USERNAME
- GITEA_UPDATE_AVATAR
- GITEA_ACCOUNT_LINKING
- GITEA_OAUTH2_CLIENT_ENABLED
- GITEA_CORS_ALLOW_DOMAIN
- GITEA_LANDING_PAGE
- GITEA_REPO_UPLOAD_ENABLED
- GITEA_REPO_UPLOAD_ALLOWED_TYPES
- GITEA_REPO_UPLOAD_MAX_SIZE
- GITEA_REPO_UPLOAD_MAX_FILES
- GITEA_REPO_INDEXER_ENABLED
- GITEA_ISSUE_INDEXER_TYPE
- GITEA_STARTUP_TIMEOUT
- GITEA_SHOW_USER_EMAIL
- GITEA_DISABLE_REGULAR_ORG_CREATION
- GITEA_DEFAULT_KEEP_EMAIL_PRIVATE
- GITEA_DEFAULT_ALLOW_CREATE_ORGANIZATION
- GITEA_ENABLE_USER_HEATMAP
- GITEA_DEFAULT_USER_VISIBILITY
- GITEA_ALLOWED_USER_VISIBILITY_MODES
- GITEA_DEFAULT_ORG_VISIBILITY
- GITEA_REQUIRE_SIGNIN_VIEW
- GITEA__oauth2__REFRESH_TOKEN_EXPIRATION_TIME
- GITEA_LFS_START_SERVER=${GITEA_LFS_START_SERVER:-false}
volumes:
- data:/var/lib/gitea
- config:/etc/gitea
@@ -38,11 +61,18 @@ services:
networks:
- proxy
- internal
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/healthz"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
deploy:
update_config:
failure_action: rollback
order: start-first
order: stop-first
labels:
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
- "traefik.enable=true"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
@@ -51,24 +81,14 @@ services:
- "traefik.tcp.routers.${STACK_NAME}-ssh.rule=HostSNI(`*`)"
- "traefik.tcp.routers.${STACK_NAME}-ssh.entrypoints=gitea-ssh"
- "traefik.tcp.services.${STACK_NAME}-ssh.loadbalancer.server.port=${GITEA_SSH_PORT}"
- coop-cloud.${STACK_NAME}.version=1.1.1+1.15.3-rootless
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}_cors"
- "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolallowmethods=GET,OPTIONS,PUT"
- "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolallowheaders=content-type,authorization"
- "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolalloworiginlist=https://${GITEA_CORS_ALLOW_DOMAIN}"
- "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolmaxage=100"
- "traefik.http.middlewares.${STACK_NAME}_cors.headers.addvaryheader=true"
- coop-cloud.${STACK_NAME}.version=3.6.0+1.24.2-rootless
db:
image: "mariadb:10.6"
command: |
mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
- MYSQL_DATABASE=gitea
- MYSQL_USER=gitea
- MYSQL_PASSWORD_FILE=/run/secrets/db_password
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
secrets:
- db_password
- db_root_password
volumes:
- "mariadb:/var/lib/mysql"
networks:
- internal
networks:
internal:
@@ -86,12 +106,6 @@ configs:
template_driver: golang
secrets:
db_password:
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
external: true
db_root_password:
name: ${STACK_NAME}_db_root_password_${SECRET_DB_ROOT_PASSWORD_VERSION}
external: true
internal_token:
name: ${STACK_NAME}_internal_token_${SECRET_INTERNAL_TOKEN_VERSION}
external: true
@@ -105,4 +119,3 @@ secrets:
volumes:
data:
config:
mariadb:
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
set -e
BACKUP_FILE='/var/lib/postgresql/data/backup.sql'
function backup {
export PGPASSWORD=$(cat $POSTGRES_PASSWORD_FILE)
pg_dump -U ${POSTGRES_USER} ${POSTGRES_DB} > $BACKUP_FILE
}
function restore {
cd /var/lib/postgresql/data/
restore_config(){
# Restore allowed connections
cat pg_hba.conf.bak > pg_hba.conf
su postgres -c 'pg_ctl reload'
}
# Don't allow any other connections than local
cp pg_hba.conf pg_hba.conf.bak
echo "local all all trust" > pg_hba.conf
su postgres -c 'pg_ctl reload'
trap restore_config EXIT INT TERM
# Recreate Database
psql -U ${POSTGRES_USER} -d postgres -c "DROP DATABASE ${POSTGRES_DB} WITH (FORCE);"
createdb -U ${POSTGRES_USER} ${POSTGRES_DB}
psql -U ${POSTGRES_USER} -d ${POSTGRES_DB} -1 -f $BACKUP_FILE
trap - EXIT INT TERM
restore_config
}
$@
+8
View File
@@ -0,0 +1,8 @@
This release adds the possibility to run gitea with postgres.
Please add the following lines to your servers .env file!
```
COMPOSE_FILE="compose.yml"
COMPOSE_FILE="$COMPOSE_FILE:compose.mariadb.yml"
# COMPOSE_FILE="$COMPOSE_FILE:compose.postgres.yml"
```
+2
View File
@@ -0,0 +1,2 @@
Beware that you'll also be updating Postgres if you're running it. Usually with major updates it might involve pg_dumpall / pg_restore either side of the upgrade because the server app doesn't know how to upgrade data storage formats, won't launch if it detects an old data format, a pg_upgrade command is available. More info on https://git.coopcloud.tech/coop-cloud/gitea/pulls/31
+1
View File
@@ -0,0 +1 @@
This release adds a docker healthcheck for the main Gitea service -- please pay careful attention when updating apps, and as always feel free to ask in Matrix if you run into any bugs 🐛
+3
View File
@@ -0,0 +1,3 @@
BEWARE! 🚨 This release updates to the newer Gitea SMTP settings format.
If you are using SMTP, you will need to split the old GITEA_MAILER_HOST into separate GITEA_MAILER_ADDR (hostname) and GITEA_MAILER_PORT settings.
+6
View File
@@ -0,0 +1,6 @@
Forgejo support has been moved to its own recipe. Make the move by:
* Getting the recipe locally with `abra recipe fetch forgejo`
* Changing the recipe's TYPE with `abra application config FORGEJO_DOMAIN`
* Redeploy the app with `abra application undeploy` and `abra
application deploy`