This commit is contained in:
parent
4c3a0c648e
commit
bb9f3e68d9
1 changed files with 81 additions and 1 deletions
80
README.md
80
README.md
|
@ -3,3 +3,83 @@
|
|||
[![Build Status](https://drone.faercol.me/api/badges/PolyculeConnect/polycule-connect/status.svg)](https://drone.faercol.me/PolyculeConnect/polycule-connect)
|
||||
|
||||
PolyculeConnect
|
||||
|
||||
## Configuration
|
||||
|
||||
Here is an example config file
|
||||
|
||||
```json
|
||||
{
|
||||
"log": {
|
||||
"level": "debug" // debug,info,warn,error
|
||||
},
|
||||
"server": {
|
||||
"port": 5000, // only used in net mode
|
||||
"host": "0.0.0.0", // only used in net mode
|
||||
// "sock": "/your/sock.sock" // path to your unix sock if "mode" is set to "unix"
|
||||
"mode": "net" // net,unix
|
||||
},
|
||||
"openconnect": {
|
||||
"issuer": "https://polyculeconnect.domain", // hostname of your polyculeconnect server
|
||||
"clients": [
|
||||
{
|
||||
"name": "<name>",
|
||||
"id": "<client_id>",
|
||||
"secret": "<client_secret>",
|
||||
"redirectURIs": [
|
||||
"<redirect_uri>"
|
||||
]
|
||||
}
|
||||
],
|
||||
"backends": [
|
||||
{
|
||||
"id": "<unique_id>",
|
||||
"name": "<human_readable_name>",
|
||||
"local": true,
|
||||
"type": "oidc", // must be "oidc" for now
|
||||
"config": {
|
||||
"issuer": "https://polyculeconnect.domain", // must be the same as current issuer
|
||||
"clientID": "<client_id>",
|
||||
"clientSecret": "<client_secret>",
|
||||
"redirectURI": "<redirect_uri>"
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You can register multiple backend and multiple clients (applications)
|
||||
|
||||
## Running the server
|
||||
|
||||
### Running from sources
|
||||
|
||||
```bash
|
||||
# clone the directory
|
||||
git clone https://git.faercol.me/PolyculeConnect/polycule-connect.git
|
||||
|
||||
cd polycule-connect
|
||||
|
||||
# build the sources
|
||||
make -C polyculeconnect build
|
||||
|
||||
# edit the configuration file
|
||||
vim config.json
|
||||
|
||||
# run the application
|
||||
./polyculeconnect/build/polyculeconnect -config config.json
|
||||
```
|
||||
|
||||
### Running from docker image
|
||||
|
||||
```bash
|
||||
# edit the configuration file
|
||||
mkdir -p config
|
||||
vim config/config.json
|
||||
|
||||
# run the docker container
|
||||
docker run -v ./config/:/config -p 5000:5000 -it git.faercol.me/polyculeconnect/polyculeconnect:latest
|
||||
```
|
||||
|
||||
Or using the example docker compose `docker compose up`
|
||||
|
|
Loading…
Reference in a new issue