Skip to content

Commit

Permalink
Merge pull request #5 from SDKAAA/main
Browse files Browse the repository at this point in the history
small updates
  • Loading branch information
SDKAAA authored Mar 11, 2024
2 parents ae467a6 + b6bdae0 commit cd2d290
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,20 @@ First Install Keycloak and Forgejo by changing directory to folders keycloak and

- Create a Client

- Use "OpenID Connect" as "Client Type"
- Use "forgejo" as "Client ID"
- Tap Next
- Check "Client authentication"
- Make sure "Client authentication" is set to "On"
- Tap Next
- Enter http://YOUR-FORGEJO-IP:YOUR-FORGEJO-PORT/* for "Valid redirect URIs"
- Enter http://YOUR-FORGEJO-IP:YOUR-FORGEJO-PORT/ for "Web origins"
- Tap Save

- Now go in credentials tab and save the client secret

- Remark: this tab does not appears if the "Client authentication" is no set in the previous step.

<img src="media/client_secret.png" alt="Client Secret" title="Client Secret" width="1002" height="auto">
<img src="media/client_secret.png" alt="Client Secret" title="Client Secret" width="1002" height="auto">

*Remark: this tab does not appears if the "Client authentication" is no set in the previous step.*

- Create a user

Expand All @@ -68,7 +69,7 @@ First Install Keycloak and Forgejo by changing directory to folders keycloak and
- Enter "Keycloak" in "Authentication name"
- Select "OpenID Connect" in "OAuth2 Provider"
- In "Client ID" tap "forgejo". This need to be the same name as the "Client ID" in keycloack
- In "Client Secret" enter the client secret you save earlier
- In "Client Secret" enter the client secret you saved earlier
- In "OpenID Connect Auto Discovery URL" enter http://YOUR-KEYCLOAK-IP:YOUR-KEYCLOAK-PORT/realms/YOUR-REALM-NAME/.well-known/openid-configuration
- Now save your configuration
admin_view
Expand Down
1 change: 1 addition & 0 deletions forgejo/.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ POSTGRES_EXTERNAL_PORT=25432
POSTGRES_USER=forgejo_usr
POSTGRES_PASSWORD=forgejo_pwd
POSTGRES_DB=forgejo_db
POSTGRES_SCHEMA=public
FORGEJO_INTERNAL_HTTP_PORT=30001
FORGEJO_EXTERNAL_HTTP_PORT=30002
FORGEJO_EXTERNAL_SSH_PORT=222
Expand Down
2 changes: 2 additions & 0 deletions forgejo/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ services:
- FORGEJO__database__DB_TYPE=postgres
- FORGEJO__database__HOST=psqldb:${POSTGRES_INTERNAL_PORT}
- FORGEJO__database__NAME=${POSTGRES_DB}
- FORGEJO__database__SCHEMA=${POSTGRES_SCHEMA}
- FORGEJO__database__USER=${POSTGRES_USER}
- FORGEJO__database__PASSWD=${POSTGRES_PASSWORD}
- FORGEJO__server__DOMAIN=${FORGEJO_DOMAIN}
- FORGEJO__server__HTTP_PORT=${FORGEJO_INTERNAL_HTTP_PORT}
- FORGEJO__server__SSH_PORT=${FORGEJO_EXTERNAL_SSH_PORT}
- APP_NAME=${FORGEJO_APP_NAME}
restart: unless-stopped
networks:
Expand Down

0 comments on commit cd2d290

Please sign in to comment.