Docker quickstart (Commercial)
Run the Commercial edition with PostgreSQL and Redis using Docker Compose.
Start the stack
docker compose -f docker-compose.commercial.yaml up -d
This starts Talos, PostgreSQL, and Redis. Migrations run automatically.
Issue a key
- CLI
- curl
# Note: rate_limit_policy is only available via the HTTP API.
RESPONSE=$(talos keys issue "commercial-test" \
--actor user_1 \
--scopes "read,write" \
--ttl 168h \
--format json \
-e "$TALOS_URL" 2>/dev/null)
echo "$RESPONSE" | jq .
export API_SECRET=$(echo "$RESPONSE" | jq -er '.secret')
RESPONSE=$(curl -s -X POST "$TALOS_URL/v2alpha1/admin/issuedApiKeys" \
-H "Content-Type: application/json" \
-d '{
"name": "commercial-test",
"actor_id": "user_1",
"scopes": ["read", "write"],
"ttl": "168h",
"rate_limit_policy": {
"quota": 1000,
"window": "60s"
}
}')
echo "$RESPONSE" | jq .
export API_SECRET=$(echo "$RESPONSE" | jq -er '.secret')
Verify with caching
The first request hits the database; subsequent requests within the cache TTL are served from Redis:
- CLI
- curl
talos keys verify "$API_SECRET" -e "$TALOS_URL"
curl -s -X POST "$TALOS_URL/v2alpha1/admin/apiKeys:verify" \
-H "Content-Type: application/json" \
-d "{\"credential\":\"$API_SECRET\"}" | jq .
Stop the stack
docker compose -f docker-compose.commercial.yaml down
To remove all data volumes:
docker compose -f docker-compose.commercial.yaml down -v
Prerequisites
You need Docker and Docker Compose installed. See the OSS quickstart to try the free edition first.
Next steps
- Quickstart (OSS) — simpler setup with SQLite
- Architecture — admin and data plane design
- Caching — cache behavior and consistency model
