Compare commits
1 Commits
1.2.1+1.16
...
cors-heade
Author | SHA1 | Date | |
---|---|---|---|
fabd33037a |
@ -1,6 +1,6 @@
|
|||||||
TYPE=gitea
|
TYPE=gitea
|
||||||
|
|
||||||
DOMAIN={{ .Domain }}
|
DOMAIN=gitea.example.com
|
||||||
LETS_ENCRYPT_ENV=production
|
LETS_ENCRYPT_ENV=production
|
||||||
|
|
||||||
GITEA_DOMAIN=git.example.com
|
GITEA_DOMAIN=git.example.com
|
||||||
@ -11,8 +11,6 @@ GITEA_DISABLE_REGISTRATION=false
|
|||||||
GITEA_ENABLE_NOTIFY_MAIL=true
|
GITEA_ENABLE_NOTIFY_MAIL=true
|
||||||
GITEA_ENABLE_OPENID_SIGNIN=true
|
GITEA_ENABLE_OPENID_SIGNIN=true
|
||||||
GITEA_ENABLE_OPENID_SIGNUP=true
|
GITEA_ENABLE_OPENID_SIGNUP=true
|
||||||
GITEA_DISABLE_GRAVATAR=false
|
|
||||||
GITEA_ENABLE_FEDERATED_AVATAR=true
|
|
||||||
|
|
||||||
GITEA_MAILER_FROM=noreply@example.com
|
GITEA_MAILER_FROM=noreply@example.com
|
||||||
GITEA_MAILER_USER=noreply@example.com
|
GITEA_MAILER_USER=noreply@example.com
|
||||||
@ -26,6 +24,9 @@ SECRET_DB_ROOT_PASSWORD_VERSION=v1
|
|||||||
SECRET_JWT_SECRET_VERSION=v1 # length=43
|
SECRET_JWT_SECRET_VERSION=v1 # length=43
|
||||||
SECRET_SECRET_KEY_VERSION=v1 # length=64
|
SECRET_SECRET_KEY_VERSION=v1 # length=64
|
||||||
|
|
||||||
|
GITEA_CORS_ENABLED=0
|
||||||
|
# GITEA_CORS_DOMAIN=https://example.org
|
||||||
|
|
||||||
# SMTP Mailer
|
# SMTP Mailer
|
||||||
# COMPOSE_FILE="compose.yml:compose.smtp.yml"
|
# COMPOSE_FILE="compose.yml:compose.smtp.yml"
|
||||||
# GITEA_SMTP_MAILER_ENABLED=1
|
# GITEA_SMTP_MAILER_ENABLED=1
|
||||||
|
53
README.md
53
README.md
@ -1,16 +1,16 @@
|
|||||||
# Gitea
|
# Gitea
|
||||||
|
|
||||||
[](https://build.coopcloud.tech/coop-cloud/gitea)
|
[](https://drone.coopcloud.tech/coop-cloud/gitea)
|
||||||
|
|
||||||
<!-- metadata -->
|
<!-- metadata -->
|
||||||
* **Category**: Development
|
- **Category**: Development
|
||||||
* **Status**: 3, stable
|
* **Status**: ❶💚
|
||||||
* **Image**: [`gitea/gitea`](https://hub.docker.com/gitea/gitea), 4, upstream
|
- **Image**: [`gitea/gitea`](https://hub.docker.com/gitea/gitea), ❶💚, upstream
|
||||||
* **Healthcheck**: Yes
|
- **Healthcheck**: Yes
|
||||||
* **Backups**: Yes
|
* **Backups**: Yes
|
||||||
* **Email**: ?
|
- **Email**: ?
|
||||||
* **Tests**: 2
|
- **Tests**: ❷💛
|
||||||
* **SSO**: 3 (OAuth)
|
- **SSO**: ❶💚 (OAuth)
|
||||||
<!-- endmetadata -->
|
<!-- endmetadata -->
|
||||||
|
|
||||||
## Basic usage
|
## Basic usage
|
||||||
@ -22,40 +22,3 @@
|
|||||||
4. `abra app YOURAPPDOMAIN config` - be sure to change `$DOMAIN` to something that resolves to
|
4. `abra app YOURAPPDOMAIN config` - be sure to change `$DOMAIN` to something that resolves to
|
||||||
your Docker swarm box
|
your Docker swarm box
|
||||||
5. `abra app YOURAPPDOMAIN deploy`
|
5. `abra app YOURAPPDOMAIN deploy`
|
||||||
|
|
||||||
## 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.
|
|
||||||
|
18
app.ini.tmpl
18
app.ini.tmpl
@ -7,10 +7,6 @@ NAME = {{ env "GITEA_DB_NAME" }}
|
|||||||
PASSWD = {{ secret "db_password" }}
|
PASSWD = {{ secret "db_password" }}
|
||||||
USER = {{ env "GITEA_DB_USER" }}
|
USER = {{ env "GITEA_DB_USER" }}
|
||||||
|
|
||||||
[picture]
|
|
||||||
DISABLE_GRAVATAR = {{ env "GITEA_DISABLE_GRAVATAR" }}
|
|
||||||
ENABLE_FEDERATED_AVATAR = {{ env "GITEA_ENABLE_FEDERATED_AVATAR" }}
|
|
||||||
|
|
||||||
[service]
|
[service]
|
||||||
ALLOW_ONLY_EXTERNAL_REGISTRATION = {{ env "GITEA_ALLOW_ONLY_EXTERNAL_REGISTRATION" }}
|
ALLOW_ONLY_EXTERNAL_REGISTRATION = {{ env "GITEA_ALLOW_ONLY_EXTERNAL_REGISTRATION" }}
|
||||||
AUTO_WATCH_NEW_REPOS = {{ env "GITEA_AUTO_WATCH_NEW_REPOS" }}
|
AUTO_WATCH_NEW_REPOS = {{ env "GITEA_AUTO_WATCH_NEW_REPOS" }}
|
||||||
@ -62,3 +58,17 @@ ENABLED = true
|
|||||||
FILE_EXTENSIONS = .rst
|
FILE_EXTENSIONS = .rst
|
||||||
RENDER_COMMAND = rst2html
|
RENDER_COMMAND = rst2html
|
||||||
IS_INPUT_FILE = false
|
IS_INPUT_FILE = false
|
||||||
|
|
||||||
|
[picture]
|
||||||
|
AVATAR_UPLOAD_PATH = /data/gitea/avatars
|
||||||
|
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 }}
|
||||||
|
@ -3,7 +3,7 @@ version: "3.8"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: "gitea/gitea:1.16.8-rootless"
|
image: "gitea/gitea:1.15.6-rootless"
|
||||||
configs:
|
configs:
|
||||||
- source: app_ini
|
- source: app_ini
|
||||||
target: /etc/gitea/app.ini
|
target: /etc/gitea/app.ini
|
||||||
@ -30,8 +30,8 @@ services:
|
|||||||
- GITEA_ENABLE_OPENID_SIGNUP
|
- GITEA_ENABLE_OPENID_SIGNUP
|
||||||
- GITEA_SMTP_MAILER_ENABLED
|
- GITEA_SMTP_MAILER_ENABLED
|
||||||
- GITEA_SSH_PORT
|
- GITEA_SSH_PORT
|
||||||
- GITEA_DISABLE_GRAVATAR
|
- GITEA_CORS_ENABLED
|
||||||
- GITEA_ENABLE_FEDERATED_AVATAR
|
- GITEA_CORS_DOMAIN
|
||||||
volumes:
|
volumes:
|
||||||
- data:/var/lib/gitea
|
- data:/var/lib/gitea
|
||||||
- config:/etc/gitea
|
- config:/etc/gitea
|
||||||
@ -53,7 +53,7 @@ services:
|
|||||||
- "traefik.tcp.routers.${STACK_NAME}-ssh.rule=HostSNI(`*`)"
|
- "traefik.tcp.routers.${STACK_NAME}-ssh.rule=HostSNI(`*`)"
|
||||||
- "traefik.tcp.routers.${STACK_NAME}-ssh.entrypoints=gitea-ssh"
|
- "traefik.tcp.routers.${STACK_NAME}-ssh.entrypoints=gitea-ssh"
|
||||||
- "traefik.tcp.services.${STACK_NAME}-ssh.loadbalancer.server.port=${GITEA_SSH_PORT}"
|
- "traefik.tcp.services.${STACK_NAME}-ssh.loadbalancer.server.port=${GITEA_SSH_PORT}"
|
||||||
- coop-cloud.${STACK_NAME}.version=1.2.1+1.16.8-rootless
|
- coop-cloud.${STACK_NAME}.version=1.1.2+1.15.6-rootless
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: "mariadb:10.6"
|
image: "mariadb:10.6"
|
||||||
|
Reference in New Issue
Block a user