easy-gate
A gate to your self hosted infrastructure
Deployment
Easy Gate can be deployed on any server that supports Docker. If your infrastructure is running behind a configured nginx instance, it is recommended to read the Docker Compose (with nginx) section.
Docker
You can deploy an instance of easy-gate by using docker:
docker run -d --name=easy-gate \
-p 8080:8080 \
-v /path/to/easy-gate.json:/etc/easy-gate/easy-gate.json \
--restart unless-stopped \
r7wx/easy-gate
Docker Compose
You can also run easy-gate by using the provided docker-compose file:
docker-compose up
Docker Compose (with nginx)
If you need to host easy-gate behind an already installed nginx instance, you can use the docker-compose file in the examples directory:
easy-gate:
image: r7wx/easy-gate:latest
container_name: easy-gate
expose:
- 8080
networks:
- nginx-net
volumes:
- ../easy-gate.json:/etc/easy-gate/easy-gate.json
- ./easy-gate.nginx.conf:/etc/nginx/conf.d/default.conf
[...]
In order to correctly use the groups feature you must overwrite the internal easy-gate nginx configuration in order to forward requests headers:
[...]
location /api {
proxy_redirect off;
proxy_pass_request_headers on;
proxy_pass http://127.0.0.1:8081;
}
[...]
You can find the complete file in the examples directory (examples/easy-gate.nginx.conf).
Configuration
Easy gate can be configured by the easy-gate.json file. An illustrative configuration file is provided in the root directory of this repository (easy-gate.json).
Groups
Group entries are used to define which users can see which items, by providing the user subnet:
"groups": [
{
"name": "internal",
"subnet": "192.168.1.1/24"
},
{
"name": "vpn",
"subnet": "10.8.1.1/24"
}
]
Services
A service entry is used to define a service that is available in the infrastructure. Each service has a name, an url, an icon and the groups that can see it (defined in the groups section). If no group is provided the item can be seen by all users:
{
"icon": "fa-brands fa-git-square",
"name": "Git",
"url": "https://git.example.vpn",
"groups": [
"vpn"
]
},
{
"icon": "fa-brands fa-docker",
"name": "Portainer",
"url": "https://portainer.example.internal",
"groups": []
}
Notes
A note entry is used to define a simple text note which has a title and a content. Each note has a name, the note content (text) and the groups that can see it (defined in the groups section). If no group is provided the item can be seen by all users:
{
"name": "Simple note",
"text": "This is a simple note for vpn users",
"groups": [
"vpn"
]
},
{
"name": "Global note",
"text": "This note will be visible to everyone",
"groups": []
}
Icons
Icons are provided by the Font Awesome library. Get the appropriate icon name by using the Font Awesome website (only free icons are available).