Compare commits

...

111 Commits

Author SHA1 Message Date
Moritz 9687f7f738 chore: publish 2.8.0+1.21.11-rootless release
continuous-integration/drone/tag Build is passing Details
continuous-integration/drone/push Build is passing Details
2024-05-13 16:20:13 +02:00
Moritz 92073fbba5 fix backup label
continuous-integration/drone/push Build is passing Details
2024-04-30 15:18:21 +02:00
Moritz f26296ba5c add backup label
continuous-integration/drone/push Build is passing Details
2024-04-29 15:24:13 +02:00
Javielico baacc575c2 chore: publish 2.7.0+1.21.11-rootless release
continuous-integration/drone/tag Build is passing Details
continuous-integration/drone/push Build is passing Details
2024-04-24 21:03:14 +01:00
javielico 53ffe86350 Merge pull request 'Adding more variable configs' (#36) from javielico/gitea:master into master
continuous-integration/drone/push Build is passing Details
Reviewed-on: #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
continuous-integration/drone/tag Build is passing Details
continuous-integration/drone/push Build is passing Details
2024-04-01 17:05:17 +02:00
decentral1se 43abfe0483 chore: publish 2.6.1+1.21.10-rootless release
continuous-integration/drone/tag Build is passing Details
continuous-integration/drone/push Build is passing Details
2024-04-01 16:38:05 +02:00
decentral1se 4683a81eeb Merge pull request 'feat: enable indexer for search' (#33) from indexer into master
continuous-integration/drone/push Build is passing Details
Reviewed-on: #33
2024-04-01 11:58:54 +00:00
decentral1se ea7e26698a
feat: enable indexer for search [ci skip]
continuous-integration/drone/pr Build is failing Details
See coop-cloud/organising#589
2024-03-31 01:31:39 +01:00
3wc 3815417c2c chore: publish 2.6.0+1.21.5-rootless release
continuous-integration/drone/push Build is passing Details
2024-03-30 16:07:28 -03:00
3wc 4421f81a35 Add healthcheck, update metadata 2024-03-30 16:05:32 -03:00
3wc a0e8ba4839 chore: publish 2.5.2+1.21.5-rootless release
continuous-integration/drone/push Build is passing Details
2024-02-08 14:36:08 -03:00
3wc ca9d0b4a6c chore: publish 2.5.1+1.21.4-rootless release
continuous-integration/drone/push Build is passing Details
2024-01-17 17:56:28 -03:00
Cassowary 9d44d9e61c add [repository.upload] support to the configuration
continuous-integration/drone/push Build is passing Details
Note: Requires updates to config file so add this to the release notes.
2023-12-07 18:01:05 -08:00
Cassowary 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
continuous-integration/drone/push Build is passing Details
2023-11-27 13:10:23 +01:00
3wc b0ce473627 chore: publish 2.4.0+1.21.0-rootless release
continuous-integration/drone/push Build is passing Details
2023-11-20 12:43:42 +00:00
3wc 73970dd79c chore: publish 2.3.3+1.20.5-rootless release
continuous-integration/drone/push Build is passing Details
2023-10-30 12:43:03 +00:00
3wc 9153c4db2a chore: publish 2.3.2+1.20.3-rootless release
continuous-integration/drone/push Build is passing Details
2023-08-28 14:08:11 +02:00
3wc b95eae3b57 chore: publish 2.3.1+1.20.1-rootless release
continuous-integration/drone/push Build is passing Details
2023-07-25 12:53:45 +01:00
3wc d18379a364 Bump APP_INI_VERSION 2023-07-25 12:52:59 +01:00
3wc 46bb242fe7 chore: publish 2.3.0+1.20.1-rootless release
continuous-integration/drone/push Build is passing Details
2023-07-25 12:50:30 +01:00
Philipp Rothmann f9249f1284 chore: publish 2.2.0+1.19.3-rootless release
continuous-integration/drone/push Build is passing Details
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
continuous-integration/drone/tag Build is passing Details
Reviewed-on: #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: javielico/gitea#1
2023-05-08 19:47:16 +00:00
Cassowary 8b466acf66 chore: publish 2.1.0+1.18.5-rootless release 2023-03-15 13:18:39 -07:00
3wc 9cf26a0154 Switch to thecoopcloud/stack-ssh-deploy 2023-01-20 23:31:14 -08:00
3wc a04fe41c1b Specify mariadb for tests 2023-01-20 22:38:13 -08:00
3wc 63118ecbd8 Fix CI by adding networks: [mass update] 2023-01-20 22:32:13 -08:00
3wc 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
continuous-integration/drone/push Build is failing Details
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
3wc 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
3wc f7ee9b63c4 Add optional CORS headers 2023-01-08 19:12:53 -08:00
3wc 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
continuous-integration/drone/tag Build is failing Details
Reviewed-on: #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
decentral1se 8ead189fde chore: publish 1.1.3+1.15.10-rootless release 2022-01-18 10:26:40 +01:00
decentral1se 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: #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
3wc fee8fd5342 Goodbye, emojis! 😢
[ci skip]
2021-11-23 12:19:04 +02:00
3wc 83a9e9da6b chore: fix README bullet formatting
[ci skip]
2021-11-22 13:42:03 +02:00
3wc ee34764179 Update metadata
[ci skip]
2021-11-21 21:51:51 +02:00
3wc 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
decentral1se 0547336698 chore: bump patch version 2021-10-08 09:43:16 +02:00
decentral1se 632364fccf chore: sync labels 2021-10-08 09:22:33 +02:00
decentral1se 1aa71afcf6 chore: bump to v15 for gitea 2021-10-08 09:02:27 +02:00
decentral1se 761ce25ccb docs: use new version scheme [ci skip] 2021-10-05 20:55:00 +02:00
decentral1se f6f9590cfe chore: drop old automation file 2021-10-05 09:43:05 +02:00
decentral1se 208d411f9c docs: new URLs and auto-format 2021-10-05 09:42:53 +02:00
decentral1se ea7fa4e84c chore: formatting 2021-10-05 09:42:10 +02:00
decentral1se e33bde6f4d fix: drop label on non-app service
Experimenting with new versioning scheme.
2021-10-05 09:41:28 +02:00
decentral1se 8ccf9ce883 chore: more spacing 2021-10-05 09:41:16 +02:00
Comrade Renovate Bot 969ce90b8a Update gitea/gitea Docker tag to v1.14.5 2021-07-19 07:01:48 +00:00
decentral1se 945602a70d Revert internal network change (see https://git.autonomic.zone/coop-cloud/organising/issues/62) 2021-07-15 16:08:32 +02:00
decentral1se 31d2d2b0c2 Scope internal network internally 2021-07-10 15:41:11 +02:00
Comrade Renovate Bot 9f61417eca Update gitea/gitea Docker tag to v1.14.4 2021-07-07 07:01:29 +00:00
decentral1se 51d14ce545 Version 1.14.3-rootless; sync labels 2021-06-21 12:46:39 +02:00
decentral1se d81b97e8a2 Merge branch 'master' of ssh://git.autonomic.zone:2222/coop-cloud/gitea 2021-06-21 12:31:08 +02:00
decentral1se 0cae142936 Use new image namespace 2021-06-21 12:28:33 +02:00
Comrade Renovate Bot 6956f143e9 Update gitea/gitea Docker tag to v1.14.3 2021-06-21 07:01:16 +00:00
decentral1se 903bbfd108 Remove trigger, we make the tags [ci skip] 2021-06-04 00:14:31 +02:00
decentral1se 5ba392d9a3 Fix bad name in batch update script [ci skip] 2021-06-03 23:06:30 +02:00
decentral1se 73b993a654 Add release logic to CI [ci skip] 2021-06-03 23:00:40 +02:00
decentral1se ba05cf5557 Version 1.14.2-rootless; sync labels 2021-05-10 10:06:13 +02:00
decentral1se dc8387de02 Merge pull request 'Update gitea/gitea Docker tag to v1.14.2 (master)' (#19) from renovate/master-docker-gitea-gitea-1.x into master
Reviewed-on: https://git.autonomic.zone/coop-cloud/gitea/pulls/19
2021-05-10 10:05:40 +02:00
Comrade Renovate Bot b8cf1bed7b Update gitea/gitea Docker tag to v1.14.2 2021-05-10 07:01:26 +00:00
decentral1se 13997ed671 Drop commented config for now 2021-05-07 00:33:51 +02:00
decentral1se 590c3af6f9 Version 1.14.1-rootless_1; sync labels
Point release for the mariadb container.
2021-05-03 09:28:43 +02:00
decentral1se 32b158d6fc Merge pull request 'Update mariadb Docker tag to v10.6 (master)' (#18) from renovate/master-docker-mariadb-10.x into master
Reviewed-on: https://git.autonomic.zone/coop-cloud/gitea/pulls/18
2021-05-03 09:28:24 +02:00
Comrade Renovate Bot f29e86bc10 Update mariadb Docker tag to v10.6 2021-04-30 07:01:30 +00:00
decentral1se 2550b92b7a Fix typo 2021-04-29 17:18:30 +02:00
decentral1se 4e97cae1fd Pass in conditional env var 2021-04-29 17:15:50 +02:00
decentral1se 451cb36d5d Add missing env var and sort 2021-04-29 17:11:54 +02:00
decentral1se 99cde9cec3 Disable healthcheck for now
See https://github.com/go-gitea/gitea/issues/15661
2021-04-29 16:12:26 +02:00
decentral1se 036f070dc4 Don't run installs here
See https://github.com/go-gitea/gitea/issues/15661.
2021-04-29 16:12:14 +02:00
decentral1se c4154c8673 Install curl into the image as well 2021-04-29 16:05:21 +02:00
decentral1se bff964064c Use new reverse proxy settings 2021-04-29 16:02:48 +02:00
decentral1se 7c92503773 Bump latest config version 2021-04-29 15:38:49 +02:00
decentral1se 0f43efe952 Hack the setup script and drop paths config 2021-04-29 15:29:05 +02:00
decentral1se 14fa475a5a Version 1.14.1-rootless; sync labels 2021-04-16 09:07:43 +02:00
decentral1se e8c65515b2 Merge pull request 'Update gitea/gitea Docker tag to v1.14.1 (master)' (#15) from renovate/master-docker-gitea-gitea-1.x into master
Reviewed-on: https://git.autonomic.zone/coop-cloud/gitea/pulls/15
2021-04-16 09:05:43 +02:00
15 changed files with 331 additions and 67 deletions

View File

@ -3,18 +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
DOMAIN: gitea.swarm-test.autonomic.zone
STACK_NAME: gitea
LETS_ENCRYPT_ENV: production
GITEA_ALLOW_ONLY_EXTERNAL_REGISTRATION: true
GITEA_APP_NAME: Git with solidaritea
GITEA_AUTO_WATCH_NEW_REPOS: false
@ -23,14 +26,31 @@ steps:
GITEA_ENABLE_NOTIFY_MAIL: false
GITEA_ENABLE_OPENID_SIGNIN: true
GITEA_ENABLE_OPENID_SIGNUP: true
GITEA_SSH_PORT: 2222
GITEA_SSH_ENABLED: 1
APP_INI_VERSION: v1
GITEA_SSH_PORT: 2222
LETS_ENCRYPT_ENV: production
SECRET_DB_PASSWORD_VERSION: v1
SECRET_DB_ROOT_PASSWORD_VERSION: v1
SECRET_INTERNAL_TOKEN_VERSION: v1
SECRET_JWT_SECRET_VERSION: v1
SECRET_SECRET_KEY_VERSION: v1
STACK_NAME: gitea
trigger:
branch:
- master
---
kind: pipeline
name: generate recipe catalogue
steps:
- name: release a new version
image: plugins/downstream
settings:
server: https://build.coopcloud.tech
token:
from_secret: drone_abra-bot_token
fork: true
repositories:
- coop-cloud/auto-recipes-catalogue-json
trigger:
event: tag

View File

@ -2,6 +2,12 @@ TYPE=gitea
DOMAIN=gitea.example.com
LETS_ENCRYPT_ENV=production
COMPOSE_FILE="compose.yml"
COMPOSE_FILE="$COMPOSE_FILE:compose.mariadb.yml"
# COMPOSE_FILE="$COMPOSE_FILE:compose.postgres.yml"
# Enable to use forgejo instead of gitea
# COMPOSE_FILE="$COMPOSE_FILE:compose.forgejo.yml"
GITEA_DOMAIN=git.example.com
GITEA_ALLOW_ONLY_EXTERNAL_REGISTRATION=true
@ -11,6 +17,23 @@ 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_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 +48,20 @@ 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
# SECRET_SMTP_PASSWORD_VERSION=v1
# 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
# Indexer (for issue search)
# GITEA_REPO_INDEXER_ENABLED=false
# GITEA_ISSUE_INDEXER_TYPE=db
# GITEA_STARTUP_TIMEOUT=-1

View File

@ -1,16 +1,16 @@
# Gitea
[![Build Status](https://drone.autonomic.zone/api/badges/coop-cloud/gitea/status.svg)](https://drone.autonomic.zone/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
* **Status**: 5
* **Image**: [`gitea/gitea`](https://hub.docker.com/gitea/gitea), 4, upstream
* **Healthcheck**: Yes
* **Backups**: No
* **Email**: ?
* **Tests**: ❷💛
* **SSO**: ❶💚 (OAuth)
* **Backups**: Yes
* **Email**: Yes
* **Tests**: 2
* **SSO**: 3 (OAuth)
<!-- endmetadata -->
## Basic usage
@ -19,6 +19,43 @@
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`
## 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`.
```
abra app config YOURTRAEFIKAPP
```
There uncomment or add these lines:
```
GITEA_SSH_ENABLED=1
COMPOSE_FILE="compose.yml:compose.gitea.yml"
```
Then redeploy traefik:
```
abra app undeploy YOURTRAEFIKAPP
abra app deploy YOURTRAEFIKAPP
```
You might need to wait a bit. To check if it worked, you can run
```
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
```
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.

15
abra.sh
View File

@ -1 +1,14 @@
export APP_INI_VERSION=v5
export APP_INI_VERSION=v17
export DOCKER_SETUP_SH_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
}

View File

@ -7,11 +7,22 @@ NAME = {{ env "GITEA_DB_NAME" }}
PASSWD = {{ secret "db_password" }}
USER = {{ env "GITEA_DB_USER" }}
[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" }}
@ -20,14 +31,23 @@ ENABLE_OPENID_SIGNUP = {{ env "GITEA_ENABLE_OPENID_SIGNUP" }}
[repository]
DEFAULT_BRANCH = main
[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]
APP_DATA_PATH = /data/gitea
DOMAIN = {{ env "GITEA_DOMAIN" }}
LANDING_PAGE = organizations
LFS_CONTENT_PATH = /data/gitea/lfs
LANDING_PAGE = {{ env "GITEA_LANDING_PAGE" }}
ROOT_URL = https://%(DOMAIN)s/
SSH_DOMAIN = {{ env "GITEA_DOMAIN" }}
SSH_LISTEN_PORT = {{ env "GITEA_SSH_PORT" }}
@ -37,8 +57,13 @@ START_SSH_SERVER = true
[security]
INSTALL_LOCK = true
INTERNAL_TOKEN = {{ secret "internal_token" }}
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" }}
@ -53,15 +78,23 @@ 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]
ENABLED = true
FILE_EXTENSIONS = .rst
RENDER_COMMAND = rst2html
IS_INPUT_FILE = false
[picture]
AVATAR_UPLOAD_PATH = /data/gitea/avatars
REPOSITORY_AVATAR_UPLOAD_PATH = /data/gitea/repo-avatars
[attachment]
PATH = /data/gitea/attachments
[log]
MODE=console
LEVEL=WARN
STACKTRACE_LEVEL=None
ENABLE_XORM_LOG=false

5
compose.forgejo.yml Normal file
View File

@ -0,0 +1,5 @@
version: '3.8'
services:
app:
image: codeberg.org/forgejo/forgejo:1.21.11-1-rootless

43
compose.mariadb.yml Normal file
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
db:
image: "mariadb:10.11.2"
deploy:
labels:
backupbot.backup: "true"
backupbot.backup.pre-hook: 'mysqldump --single-transaction -u root -p"$$(cat /run/secrets/db_root_password)" gitea > /var/lib/mysql/backup.sql'
backupbot.backup.post-hook: "rm -rf /var/lib/mysql/backup.sql"
backupbot.backup.path: "/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:
internal:

36
compose.postgres.yml Normal file
View File

@ -0,0 +1,36 @@
version: '3.8'
services:
app:
environment:
- GITEA_DB_TYPE=postgres
- GITEA_DB_HOST="db:5432"
- GITEA_DB_NAME=gitea
- GITEA_DB_USER=gitea
db:
image: postgres:15.7
deploy:
labels:
backupbot.backup: "true"
backupbot.backup.pre-hook: "PGPASSWORD=$$(cat $${POSTGRES_PASSWORD_FILE}) pg_dump -U $${POSTGRES_USER} $${POSTGRES_DB} > /var/lib/postgresql/data/backup.sql"
backupbot.backup.post-hook: "rm -r /var/lib/postgresql/data/backup.sql"
backupbot.backup.path: "/var/lib/postgresql/data"
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
secrets:
db_password:
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
external: true
volumes:
db:
internal:

View File

@ -1,4 +1,6 @@
---
version: "3.8"
services:
app:
environment:
@ -7,7 +9,8 @@ services:
- GITEA_MAILER_USER
secrets:
- smtp_password
secrets:
smtp_passord:
smtp_password:
name: ${STACK_NAME}_smtp_password_${SECRET_SMTP_PASSWORD_VERSION}
external: true

View File

@ -1,10 +1,15 @@
---
version: "3.8"
services:
app:
image: "gitea/gitea:1.14.1-rootless"
image: "gitea/gitea:1.21.11-rootless"
configs:
- source: app_ini
target: /etc/gitea/app.ini
- source: docker_setup_sh
target: /usr/local/bin/docker-setup.sh
mode: 0555
secrets:
- db_password
- internal_token
@ -14,16 +19,39 @@ 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
- GITEA_ENABLE_OPENID_SIGNIN
- 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
volumes:
- data:/var/lib/gitea
- config:/etc/gitea
@ -33,16 +61,17 @@ services:
- proxy
- internal
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 15s
test: ["CMD", "curl", "-f", "http://localhost:3000/api/healthz"]
interval: 30s
timeout: 10s
retries: 10
start_period: 30s
start_period: 1m
deploy:
update_config:
failure_action: rollback
order: start-first
labels:
- "backupbot.backup=true"
- "traefik.enable=true"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
@ -51,41 +80,30 @@ 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}.app.version=1.14.0-327bfb3f
db:
image: "mariadb:10.5"
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
deploy:
labels: ["coop-cloud.${STACK_NAME}.db.version=10.5-9c681cef"]
- "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.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=2.8.0+1.21.11-rootless
networks:
internal:
proxy:
external: true
configs:
app_ini:
name: ${STACK_NAME}_app_ini_${APP_INI_VERSION}
file: app.ini.tmpl
template_driver: golang
docker_setup_sh:
name: ${STACK_NAME}_docker_setup_sh_${DOCKER_SETUP_SH_VERSION}
file: docker-setup.sh.tmpl
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
@ -95,7 +113,7 @@ secrets:
secret_key:
name: ${STACK_NAME}_secret_key_${SECRET_SECRET_KEY_VERSION}
external: true
volumes:
data:
config:
mariadb:

15
docker-setup.sh.tmpl Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
# modified version of https://github.com/go-gitea/gitea/blob/d7dbe4feebac7805a4ca184f0989f58de8063d96/docker/rootless/usr/local/bin/docker-setup.sh
# also see https://github.com/go-gitea/gitea/pull/14762#issuecomment-829224656
# Prepare git folder
mkdir -p ${HOME} && chmod 0700 ${HOME}
if [ ! -w ${HOME} ]; then echo "${HOME} is not writable"; exit 1; fi
# Prepare custom folder
mkdir -p ${GITEA_CUSTOM} && chmod 0500 ${GITEA_CUSTOM}
# Prepare temp folder
mkdir -p ${GITEA_TEMP} && chmod 0700 ${GITEA_TEMP}
if [ ! -w ${GITEA_TEMP} ]; then echo "${GITEA_TEMP} is not writable"; exit 1; fi

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"
```

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

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 🐛

View File

@ -1,6 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
]
}