Compare commits

...

42 Commits

Author SHA1 Message Date
3wc
fabd33037a WIP: CORS headers
Some checks failed
continuous-integration/drone/push Build is failing
2021-11-21 22:13:32 +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
7009473b38 chore: release patch version 2021-11-02 21:45:37 +01:00
0547336698 chore: bump patch version 2021-10-08 09:43:16 +02:00
632364fccf chore: sync labels 2021-10-08 09:22:33 +02:00
1aa71afcf6 chore: bump to v15 for gitea 2021-10-08 09:02:27 +02:00
761ce25ccb docs: use new version scheme [ci skip] 2021-10-05 20:55:00 +02:00
f6f9590cfe chore: drop old automation file 2021-10-05 09:43:05 +02:00
208d411f9c docs: new URLs and auto-format 2021-10-05 09:42:53 +02:00
ea7fa4e84c chore: formatting 2021-10-05 09:42:10 +02:00
e33bde6f4d fix: drop label on non-app service
Experimenting with new versioning scheme.
2021-10-05 09:41:28 +02:00
8ccf9ce883 chore: more spacing 2021-10-05 09:41:16 +02:00
969ce90b8a Update gitea/gitea Docker tag to v1.14.5 2021-07-19 07:01:48 +00:00
945602a70d Revert internal network change (see https://git.autonomic.zone/coop-cloud/organising/issues/62) 2021-07-15 16:08:32 +02:00
31d2d2b0c2 Scope internal network internally 2021-07-10 15:41:11 +02:00
9f61417eca Update gitea/gitea Docker tag to v1.14.4 2021-07-07 07:01:29 +00:00
51d14ce545 Version 1.14.3-rootless; sync labels 2021-06-21 12:46:39 +02:00
d81b97e8a2 Merge branch 'master' of ssh://git.autonomic.zone:2222/coop-cloud/gitea 2021-06-21 12:31:08 +02:00
0cae142936 Use new image namespace 2021-06-21 12:28:33 +02:00
6956f143e9 Update gitea/gitea Docker tag to v1.14.3 2021-06-21 07:01:16 +00:00
903bbfd108 Remove trigger, we make the tags [ci skip] 2021-06-04 00:14:31 +02:00
5ba392d9a3 Fix bad name in batch update script [ci skip] 2021-06-03 23:06:30 +02:00
73b993a654 Add release logic to CI [ci skip] 2021-06-03 23:00:40 +02:00
ba05cf5557 Version 1.14.2-rootless; sync labels 2021-05-10 10:06:13 +02:00
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
b8cf1bed7b Update gitea/gitea Docker tag to v1.14.2 2021-05-10 07:01:26 +00:00
13997ed671 Drop commented config for now 2021-05-07 00:33:51 +02:00
590c3af6f9 Version 1.14.1-rootless_1; sync labels
Point release for the mariadb container.
2021-05-03 09:28:43 +02:00
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
f29e86bc10 Update mariadb Docker tag to v10.6 2021-04-30 07:01:30 +00:00
2550b92b7a Fix typo 2021-04-29 17:18:30 +02:00
4e97cae1fd Pass in conditional env var 2021-04-29 17:15:50 +02:00
451cb36d5d Add missing env var and sort 2021-04-29 17:11:54 +02:00
99cde9cec3 Disable healthcheck for now
See https://github.com/go-gitea/gitea/issues/15661
2021-04-29 16:12:26 +02:00
036f070dc4 Don't run installs here
See https://github.com/go-gitea/gitea/issues/15661.
2021-04-29 16:12:14 +02:00
c4154c8673 Install curl into the image as well 2021-04-29 16:05:21 +02:00
bff964064c Use new reverse proxy settings 2021-04-29 16:02:48 +02:00
7c92503773 Bump latest config version 2021-04-29 15:38:49 +02:00
0f43efe952 Hack the setup script and drop paths config 2021-04-29 15:29:05 +02:00
14fa475a5a Version 1.14.1-rootless; sync labels 2021-04-16 09:07:43 +02:00
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
9 changed files with 89 additions and 34 deletions

View File

@ -12,9 +12,9 @@ steps:
deploy_key:
from_secret: drone_ssh_swarm_test
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 +23,25 @@ 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: recipe release
steps:
- name: release a new version
image: thecoopcloud/drone-abra:latest
settings:
command: recipe gitea release
deploy_key:
from_secret: abra_bot_deploy_key

View File

@ -24,6 +24,9 @@ SECRET_DB_ROOT_PASSWORD_VERSION=v1
SECRET_JWT_SECRET_VERSION=v1 # length=43
SECRET_SECRET_KEY_VERSION=v1 # length=64
GITEA_CORS_ENABLED=0
# GITEA_CORS_DOMAIN=https://example.org
# SMTP Mailer
# COMPOSE_FILE="compose.yml:compose.smtp.yml"
# GITEA_SMTP_MAILER_ENABLED=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://drone.coopcloud.tech/api/badges/coop-cloud/gitea/status.svg)](https://drone.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**: ❶💚
- **Image**: [`gitea/gitea`](https://hub.docker.com/gitea/gitea), ❶💚, upstream
- **Healthcheck**: Yes
* **Backups**: Yes
- **Email**: ?
- **Tests**: ❷💛
- **SSO**: ❶💚 (OAuth)
<!-- endmetadata -->
## Basic usage

15
abra.sh
View File

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

@ -24,10 +24,8 @@ DEFAULT_BRANCH = main
STARTUP_TIMEOUT = 0
[server]
APP_DATA_PATH = /data/gitea
DOMAIN = {{ env "GITEA_DOMAIN" }}
LANDING_PAGE = organizations
LFS_CONTENT_PATH = /data/gitea/lfs
ROOT_URL = https://%(DOMAIN)s/
SSH_DOMAIN = {{ env "GITEA_DOMAIN" }}
SSH_LISTEN_PORT = {{ env "GITEA_SSH_PORT" }}
@ -37,6 +35,8 @@ 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" }}
[oauth2]
@ -65,3 +65,10 @@ REPOSITORY_AVATAR_UPLOAD_PATH = /data/gitea/repo-avatars
[attachment]
PATH = /data/gitea/attachments
{{ if eq (env "GITEA_CORS_ENABLED") "1" }}
[cors]
ENABLED=true
SCHEME=https
ALLOW_DOMAIN={{ env "GITEA_CORS_DOMAIN" }}
{{ end }}

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.15.6-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
@ -23,7 +28,10 @@ services:
- GITEA_ENABLE_NOTIFY_MAIL
- GITEA_ENABLE_OPENID_SIGNIN
- GITEA_ENABLE_OPENID_SIGNUP
- GITEA_SMTP_MAILER_ENABLED
- GITEA_SSH_PORT
- GITEA_CORS_ENABLED
- GITEA_CORS_DOMAIN
volumes:
- data:/var/lib/gitea
- config:/etc/gitea
@ -32,12 +40,6 @@ services:
networks:
- proxy
- internal
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 15s
timeout: 10s
retries: 10
start_period: 30s
deploy:
update_config:
failure_action: rollback
@ -51,9 +53,10 @@ 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
- coop-cloud.${STACK_NAME}.version=1.1.2+1.15.6-rootless
db:
image: "mariadb:10.5"
image: "mariadb:10.6"
command: |
mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
@ -68,17 +71,22 @@ services:
- "mariadb:/var/lib/mysql"
networks:
- internal
deploy:
labels: ["coop-cloud.${STACK_NAME}.db.version=10.5-9c681cef"]
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}
@ -95,6 +103,7 @@ secrets:
secret_key:
name: ${STACK_NAME}_secret_key_${SECRET_SECRET_KEY_VERSION}
external: true
volumes:
data:
config:

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

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