Path 1: the Compose stack
The stack has the portal with the Inbox, and PostgreSQL. It binds its port to 127.0.0.1. It is for development and tests.
- Clone the repository and go to it:
git clone https://github.com/ProcurAuth/portal && cd portal. - Build the image:
tools/build.sh image. - Make the secrets:
deploy/compose/init-secrets.sh. The script writes the secret files todeploy/compose/secrets/. It never replaces a file. - Start the stack:
docker compose up -d. - Open
http://127.0.0.1:4181/auth/login. Use the login and the password from the filessuperadmin_loginandsuperadmin_passwordindeploy/compose/secrets/. - Stop the stack and delete its database:
docker compose down -v.
The portal on port 4181 serves the pages, the API of the senders and the routes of the phones. No proxy is in front of it, so no ForwardAuth applies. deploy/README.md describes the stack, the variant with two instances and the K3s manifests.
Send a first alert
The stack makes an API key for a sender. Post an alert to the group infra:
curl -fsS -X POST http://127.0.0.1:4181/api/v1/alerts \ -H "Authorization: Bearer $(cat deploy/compose/secrets/inbox_api_key)" \ -H "Idempotency-Key: first-1" -H "Content-Type: application/json" \ -d '{"group":"infra","title":"My first alert"}'The answer is status 201. The alert shows in the tab Inbox of the portal. A phone that follows the group shows it too. See Inbox to enroll a phone.
Path 2: the demo with Traefik
The demo runs the portal behind Traefik with example services, three users and sample grants. It is the closest local setup to a real deployment.
- Run
./demo/up.sh. It builds the image, makes the secrets, starts the stack and seeds the data. - Open
http://localhost:8088/. - Read the logins and the passwords in
demo/.secrets/credentials.txt. - Run
./demo/smoke.shto check the gate, a ceiling, a budget, a key and the Inbox from a terminal. - Stop the demo and delete its data:
docker compose -f demo/docker-compose.yml down -v.
demo/README.md describes the accounts, the services and the checks.
Your first service
A service lists itself in the launcher with labels. For a Docker Compose service, add these labels. The router rule must match the path of portal.href.
services: wiki: image: example/wiki labels: portal.name: "Wiki" portal.href: "/wiki/" traefik.http.routers.wiki.rule: "PathPrefix(`/wiki`)" traefik.http.routers.wiki.middlewares: "portal-user@file"Then open the settings pages as the superadmin, and give the grant access on service:wiki to a user. The user then sees the tile in the launcher and can open the service. A user with no grant sees nothing. See Launcher and service discovery and Grants and the gate.
Next steps
- Put portal behind Traefik with TLS: Traefik and TLS.
- Write your own configuration file: Configuration. The program checks the file at start and refuses an unknown key.
- Give a key to an agent: Keys and limits.
- Run it for real: Operations and Security model and hardening.
Source of this page: docs/getting-started.md.