mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
Docs: Unify code block languages
Use `yaml` for Dockerfiles, `shell` for environment variables and `json` for our config file. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
877bc26078
commit
80d8cc79f6
10 changed files with 20 additions and 20 deletions
|
@ -17,7 +17,7 @@
|
|||
|
||||
6. Add the Client ID and Client Secret to your config.json file or pass them as environment variables
|
||||
- `config.json`:
|
||||
```js
|
||||
```json
|
||||
{
|
||||
"production": {
|
||||
"github": {
|
||||
|
@ -29,7 +29,7 @@
|
|||
```
|
||||
|
||||
- environment variables:
|
||||
```sh
|
||||
```shell
|
||||
CMD_GITHUB_CLIENTID=3747d30eaccXXXXXXXXX
|
||||
CMD_GITHUB_CLIENTSECRET=2a8e682948eee0c580XXXXXXXXXXXXXXXXXXXXXX
|
||||
````
|
||||
```
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
6. In the `docker-compose.yml` add the following environment variables to `app:` `environment:`
|
||||
|
||||
```Dockerfile
|
||||
```yaml
|
||||
- CMD_DOMAIN=your.hedgedoc.domain
|
||||
- CMD_URL_ADDPORT=true
|
||||
- CMD_PROTOCOL_USESSL=true
|
||||
|
|
|
@ -30,7 +30,7 @@ You may note that a separate realm is specified throughout this tutorial. It is
|
|||
|
||||
5. In the `docker-compose.yml` add the following environment variables to `app:` `environment:`
|
||||
|
||||
```Dockerfile
|
||||
```yaml
|
||||
CMD_OAUTH2_USER_PROFILE_URL=https://keycloak.example.com/auth/realms/your-realm/protocol/openid-connect/userinfo
|
||||
CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR=preferred_username
|
||||
CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR=name
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
To setup your HedgeDoc instance with Active Directory you need the following configs:
|
||||
|
||||
```env
|
||||
```shell
|
||||
CMD_LDAP_URL=ldap://internal.example.com
|
||||
CMD_LDAP_BINDDN=cn=binduser,cn=Users,dc=internal,dc=example,dc=com
|
||||
CMD_LDAP_BINDCREDENTIALS=<super secret password>
|
||||
CMD_LDAP_BINDCREDENTIALS="<super secret password>"
|
||||
CMD_LDAP_SEARCHBASE=dc=internal,dc=example,dc=com
|
||||
CMD_LDAP_SEARCHFILTER=(&(objectcategory=person)(objectclass=user)(|(sAMAccountName={{username}})(mail={{username}})))
|
||||
CMD_LDAP_USERIDFIELD=sAMAccountName
|
||||
CMD_LDAP_PROVIDERNAME=Example Inc AD
|
||||
CMD_LDAP_PROVIDERNAME="Example Inc AD"
|
||||
```
|
||||
|
||||
`CMD_LDAP_BINDDN` is either the `distinguishedName` or the `userPrincipalName`. *This can cause "username/password is invalid" when either this value or the password from `CMD_LDAP_BINDCREDENTIALS` are incorrect.*
|
||||
|
|
|
@ -24,7 +24,7 @@ This guide uses the generic OAuth2 module for compatibility with Mattermost vers
|
|||
|
||||
7. Add the Client ID and Client Secret to your config.json file or pass them as environment variables
|
||||
- `config.json`:
|
||||
```javascript
|
||||
```json
|
||||
{
|
||||
"production": {
|
||||
"oauth2": {
|
||||
|
|
|
@ -30,7 +30,7 @@ successfully with Nextcloud 14 and Nextcloud 20).
|
|||
also replace `<your-nextcloud-domain>` with the right domain name.
|
||||
- `config.json`:
|
||||
|
||||
```javascript
|
||||
```json
|
||||
{
|
||||
"production": {
|
||||
"oauth2": {
|
||||
|
|
|
@ -107,7 +107,7 @@ The configured mappers should look like this:
|
|||
}
|
||||
```
|
||||
It you configure HedgeDoc with enviroment variables, these are the ones you have to set:
|
||||
```bash
|
||||
```shell
|
||||
CMD_SAML_ATTRIBUTE_USERNAME=username
|
||||
CMD_SAML_ATTRIBUTE_EMAIL=email
|
||||
```
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
8. In your HedgeDoc server, create IdP certificate file from (A)
|
||||
9. Add the IdP URL (B) and the Idp certificate file path to your config.json file or pass them as environment variables.
|
||||
- `config.json`:
|
||||
```javascript
|
||||
```json
|
||||
{
|
||||
"production": {
|
||||
"saml": {
|
||||
|
@ -46,7 +46,7 @@
|
|||
```
|
||||
|
||||
- environment variables
|
||||
```sh
|
||||
```shell
|
||||
CMD_SAML_IDPSSOURL=https://*******.onelogin.com/trust/saml2/http-post/sso/******
|
||||
CMD_SAML_IDPCERT=/path/to/idp_cert.pem
|
||||
```
|
||||
|
|
|
@ -30,7 +30,7 @@ you want to match your IdP, you can use more configurations as below.
|
|||
```
|
||||
|
||||
- environment variables
|
||||
```env
|
||||
```shell
|
||||
CMD_SAML_ISSUER=myhedgedoc
|
||||
CMD_SAML_IDENTIFIERFORMAT=urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
|
||||
```
|
||||
|
@ -46,7 +46,7 @@ you want to match your IdP, you can use more configurations as below.
|
|||
- *Note:* Default value of all attributes is NameID of SAML response, which is email address if `identifierFormat` is default.
|
||||
|
||||
- `config.json`:
|
||||
```javascript
|
||||
```json
|
||||
{
|
||||
"production": {
|
||||
"saml": {
|
||||
|
@ -62,7 +62,7 @@ you want to match your IdP, you can use more configurations as below.
|
|||
```
|
||||
|
||||
- environment variables
|
||||
```sh
|
||||
```shell
|
||||
CMD_SAML_ATTRIBUTE_ID=sAMAccountName
|
||||
CMD_SAML_ATTRIBUTE_USERNAME=nickName
|
||||
CMD_SAML_ATTRIBUTE_EMAIL=mail
|
||||
|
@ -77,7 +77,7 @@ you want to match your IdP, you can use more configurations as below.
|
|||
- *Note:* Evaluates `externalGroups` first
|
||||
|
||||
- `config.json`:
|
||||
```javascript
|
||||
```json
|
||||
{
|
||||
"production": {
|
||||
"saml": {
|
||||
|
@ -91,7 +91,7 @@ you want to match your IdP, you can use more configurations as below.
|
|||
```
|
||||
|
||||
- environment variables
|
||||
```sh
|
||||
```shell
|
||||
CMD_SAML_GROUPATTRIBUTE=memberOf
|
||||
CMD_SAML_REQUIREDGROUPS=hedgedoc-users|board-members
|
||||
CMD_SAML_EXTERNALGROUPS=temporary-staff
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
7. Add your Consumer Key and Consumer Secret to your `config.json` file or pass them as environment variables:
|
||||
- `config.json`:
|
||||
```javascript
|
||||
```json
|
||||
{
|
||||
"production": {
|
||||
"twitter": {
|
||||
|
@ -36,7 +36,7 @@
|
|||
```
|
||||
|
||||
- environment variables:
|
||||
```sh
|
||||
```shell
|
||||
CMD_TWITTER_CONSUMERKEY=esTCJFXXXXXXXXXXXXXXXXXXX
|
||||
CMD_TWITTER_CONSUMERSECRET=zpCs4tU86pRVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue