mirror of
https://github.com/thomiceli/opengist.git
synced 2025-07-09 01:18:04 +02:00
Add Vitepress docs (#326)
* Add vitepress for docs * some fix * Use vitepress and update docs * Use vitepress and update docs * Update README.md * Add favicon * Add docs by @jiriks74 Co-authored-by: jiriks74 <jiri@stefka.eu> --------- Co-authored-by: jiriks74 <jiri@stefka.eu>
This commit is contained in:
@ -1,52 +0,0 @@
|
||||
# Use OAuth providers
|
||||
|
||||
Opengist can be configured to use OAuth to authenticate users, with GitHub, Gitea, or OpenID Connect.
|
||||
|
||||
## Github
|
||||
|
||||
* Add a new OAuth app in your [GitHub account settings](https://github.com/settings/applications/new)
|
||||
* Set 'Authorization callback URL' to `http://opengist.url/oauth/github/callback`
|
||||
* Copy the 'Client ID' and 'Client Secret' and add them to the [configuration](/docs/configuration/cheat-sheet.md) :
|
||||
```yaml
|
||||
github.client-key: <key>
|
||||
github.secret: <secret>
|
||||
```
|
||||
|
||||
|
||||
## GitLab
|
||||
|
||||
* Add a new OAuth app in Application settings from the [GitLab instance](https://gitlab.com/-/user_settings/applications)
|
||||
* Set 'Redirect URI' to `http://opengist.url/oauth/gitlab/callback`
|
||||
* Copy the 'Client ID' and 'Client Secret' and add them to the [configuration](/docs/configuration/cheat-sheet.md) :
|
||||
```yaml
|
||||
gitlab.client-key: <key>
|
||||
gitlab.secret: <secret>
|
||||
# URL of the GitLab instance. Default: https://gitlab.com/
|
||||
gitlab.url: https://gitlab.com/
|
||||
```
|
||||
|
||||
|
||||
## Gitea
|
||||
|
||||
* Add a new OAuth app in Application settings from the [Gitea instance](https://gitea.com/user/settings/applications)
|
||||
* Set 'Redirect URI' to `http://opengist.url/oauth/gitea/callback`
|
||||
* Copy the 'Client ID' and 'Client Secret' and add them to the [configuration](/docs/configuration/cheat-sheet.md) :
|
||||
```yaml
|
||||
gitea.client-key: <key>
|
||||
gitea.secret: <secret>
|
||||
# URL of the Gitea instance. Default: https://gitea.com/
|
||||
gitea.url: http://localhost:3000
|
||||
```
|
||||
|
||||
|
||||
## OpenID Connect
|
||||
|
||||
* Add a new OAuth app in Application settings of your OIDC provider
|
||||
* Set 'Redirect URI' to `http://opengist.url/oauth/openid-connect/callback`
|
||||
* Copy the 'Client ID', 'Client Secret', and the discovery endpoint, and add them to the [configuration](/docs/configuration/cheat-sheet.md) :
|
||||
```yaml
|
||||
oidc.client-key: <key>
|
||||
oidc.secret: <secret>
|
||||
# Discovery endpoint of the OpenID provider. Generally something like http://auth.example.com/.well-known/openid-configuration
|
||||
oidc.discovery-url: http://auth.example.com/.well-known/openid-configuration
|
||||
```
|
48
docs/administration/traefik-reverse-proxy.md
Normal file
48
docs/administration/traefik-reverse-proxy.md
Normal file
@ -0,0 +1,48 @@
|
||||
# Use Traefik as a reverse proxy
|
||||
|
||||
You can set up Traefik in two ways:
|
||||
|
||||
<details>
|
||||
<summary>Using Docker labels</summary>
|
||||
|
||||
Add these labels to your `docker-compose.yml` file:
|
||||
|
||||
```yml
|
||||
labels:
|
||||
- traefik.http.routers.opengist.rule=Host(`opengist.example.com`) # Change to your subdomain
|
||||
# Uncomment the line below if you run Opengist in a subdirectory
|
||||
# - traefik.http.routers.app1.rule=PathPrefix(`/opengist{regex:$$|/.*}`) # Change opentist in the regex to yuor subdirectory name
|
||||
- traefik.http.routers.opengist.entrypoints=websecure # Change to the name of your 443 port entrypoint
|
||||
- traefik.http.routers.opengist.tls.certresolver=lets-encrypt # Change to certresolver's name
|
||||
- traefik.http.routers.opengist.service=opengist
|
||||
- traefik.http.services.opengist.loadBalancer.server.port=6157
|
||||
```
|
||||
</details>
|
||||
<details>
|
||||
<summary>Using a <code>yml</code> file</summary>
|
||||
|
||||
> [!Note]
|
||||
> Don't forget to change the `<server-address>` to your server's IP
|
||||
|
||||
`traefik_dynamic.yml`
|
||||
```yml
|
||||
http:
|
||||
routers:
|
||||
opengist:
|
||||
entrypoints: websecure
|
||||
rule: Host(`opengist.example.com`) # Comment this line and uncomment the line below if using a subpath
|
||||
# rule: PathPrefix(`/opengist{regex:$$|/.*}`) # Change opentist in the regex to yuor subdirectory name
|
||||
# middlewares:
|
||||
# - opengist-fail2ban
|
||||
service: opengist
|
||||
tls:
|
||||
certresolver: lets-encrypt
|
||||
services:
|
||||
opengist:
|
||||
loadbalancer:
|
||||
servers:
|
||||
- url: "http://<server-address>:6157"
|
||||
|
||||
```
|
||||
|
||||
</details>
|
Reference in New Issue
Block a user