Compare commits

...

18 Commits

Author SHA1 Message Date
9413c79e8f chore: publish 2.0.1+1.18.2-rootless release 2023-01-20 11:00:24 +01:00
7d7761dec6 feat: add forgejo overwrite
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-20 10:55:04 +01:00
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
89400089ec fix: drop db_password from main compose def
Now available in mariadb/postgresql compose files.
2023-01-17 10:45:19 +01:00
1ea412525f chore: publish 2.0.0+1.18.0-rootless release 2023-01-09 17:02:07 +01:00
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
f35689989c Merge pull request 'Adding Oauth2 options and up on versions' (#29) from javielico/gitea:master into master
Some checks failed
continuous-integration/drone/tag Build is failing
Reviewed-on: #29
2022-11-13 21:54:01 +00:00
1d4dc8e8bb Bump version up on compose.yml 2022-11-13 00:45:23 +00:00
f85eaed26e Adding GITEA_OAUTH2_CLIENT_ENABLED to compose.yml and .env.sample 2022-11-11 16:47:52 +00:00
fbb36d5598 Up versions of gitea and mariadb 2022-11-11 16:15:34 +00:00
13c8af2356 Version bump 2022-11-11 16:11:33 +00:00
a4cddb7b09 Adding vars to compose.yml 2022-11-11 16:10:38 +00:00
daf24d521f Adding variables to .env.sample 2022-11-11 16:09:27 +00:00
b92ad0d45c Add oauth2_client options 2022-11-11 16:04:33 +00:00
af97db8082 chore: publish 1.3.0+1.17.2-rootless release 2022-09-07 14:45:39 +02:00
9 changed files with 122 additions and 34 deletions

View File

@ -1,7 +1,13 @@
TYPE=gitea
DOMAIN={{ .Domain }}
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
@ -27,7 +33,15 @@ 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

View File

@ -19,9 +19,9 @@
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

View File

@ -1,4 +1,4 @@
export APP_INI_VERSION=v8
export APP_INI_VERSION=v9
export DOCKER_SETUP_SH_VERSION=v1
abra_backup_app() {

View File

@ -57,6 +57,15 @@ 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

5
compose.forgejo.yml Normal file
View File

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

37
compose.mariadb.yml Normal file
View File

@ -0,0 +1,37 @@
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.9"
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:

30
compose.postgres.yml Normal file
View File

@ -0,0 +1,30 @@
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:9.6
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

@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: "gitea/gitea:1.16.8-rootless"
image: "gitea/gitea:1.18.2-rootless"
configs:
- source: app_ini
target: /etc/gitea/app.ini
@ -19,10 +19,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
@ -32,6 +28,13 @@ services:
- 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
volumes:
- data:/var/lib/gitea
- config:/etc/gitea
@ -53,24 +56,13 @@ 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.2.1+1.16.8-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.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.0.1+1.18.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:
@ -88,12 +80,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
@ -107,4 +93,3 @@ secrets:
volumes:
data:
config:
mariadb:

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