Public repo can be found here.
An authentication service that implements:
Example user:
{
"id": "3f4b2b87-d7b1-4b9f-b207-ae00b112382f",
"email": "[email protected]",
"first_name": "Some",
"last_name": "One",
"user_type": {
"name": "user",
"scopes": [
"write",
"read"
]
},
"is_active": true,
"is_verified": true
}
Command line arguments the service accepts:
| Argument | Description |
|---|---|
-h, --help | Show help message and exit |
-reflection, --reflection | Used to allow gRPC Web UI tools to connect |
-port, --port | Port to bind to |
-bearer-duration, --bearer-duration | Duration of bearer tokens (e.g. 8h) |
-reset-duration, --reset-duration | Duration of reset tokens (e.g. 1h) |
-verify-duration, --verify-duration | Duration of verify tokens (e.g. 1h) |
-migrations, --migrations | Migrations, "on", "dry-run" or "off", dry run will exit, default "on" |
A list of the environment variables:
| Variable | Description |
|---|---|
DB_DNS | Postgres dns url e.g. postgresql://user:pass@host:5432/db?sslmode=disable |
pull:
docker pull accent/grpc-service-auth:latest
compose:
version: '3.9'
services:
auth:
image: accent/grpc-service-auth:latest
environment:
DB_DNS: postgresql://postgres:password@db:5432/appdb
command:
- -bearer-duration=8h
health check Is only available from v0.0.5:
version: '3.9'
services:
...
auth:
image: accent/grpc-service-auth:latest
environment:
DB_DNS: postgresql://postgres:password@db:5432/appdb
app:
depends_on:
auth:
condition: service_healthy
if you specify a different port other than 50051 change the health check:
version: '3.9'
services:
...
auth:
image: accent/grpc-service-auth:latest
environment:
DB_DNS: postgresql://postgres:password@db:5432/appdb
healthcheck:
test: [ "CMD", "/usr/local/bin/grpc_health_probe", "-addr=:50052" ]
interval: 2s
timeout: 2s
retries: 10
command:
- -port=50052
Content type
Image
Digest
sha256:6afcff07f…
Size
90.5 MB
Last updated
1 day ago
docker pull accent/grpc-service-auth