Sign inSign up

jonatasoli/keyrunes

By jonatasoli

•Updated about 1 month ago

High-performance, extensible authorization system built in Rust.

Image
Security
Web servers
0

892

jonatasoli/keyrunes repository overview

⁠KeyRunes - Modern Access Control Engine

KeyRunes is a high-performance authorization system built in Rust, designed for modern applications requiring advanced access control.

ā šŸš€ Quick Start

KeyRunes runs as a Docker container and requires PostgreSQL 17+ as a database.

  1. Create .env file:
JWT_SECRET=your-jwt-secret-key
DATABASE_URL=postgres://postgres:your-secure-password@keyrunes-database:5432/keyrunes
LOG_LEVEL=info
  1. Create docker-compose.yml:
services:
  keyrunes-database:
    image: postgres:17
    environment:
      POSTGRES_PASSWORD: "your-secure-password"
      POSTGRES_DB: keyrunes
    volumes:
      - keyrunes_data:/var/lib/postgresql/data

  keyrunes:
    image: jonatasoli/keyrunes:latest
    depends_on:
      keyrunes-database:
        condition: service_healthy
    environment:
      DATABASE_URL: ${DATABASE_URL}
      JWT_SECRET: ${JWT_SECRET}
    ports:
      - "3000:3000"

volumes:
  keyrunes_data:
  1. Start:
docker-compose up -d
  1. Access: http://localhost:3000⁠
⁠Using Docker Run
# Start PostgreSQL
docker run -d \
  --name keyrunes-db \
  -e POSTGRES_PASSWORD=yourpassword \
  -e POSTGRES_DB=keyrunes \
  -v keyrunes_data:/var/lib/postgresql/data \
  postgres:17

# Start KeyRunes
docker run -d \
  --name keyrunes \
  --link keyrunes-db:database \
  -e DATABASE_URL=postgres://postgres:yourpassword@database:5432/keyrunes \
  -e JWT_SECRET=your-secret-key \
  -p 3000:3000 \
  jonatasoli/keyrunes:latest

⁠Requirements

  • PostgreSQL 17+ (required)
  • Docker 20.10+
  • Port 3000 available

⁠Environment Variables

VariableRequiredDescription
DATABASE_URLYesPostgreSQL connection string
JWT_SECRETYesSecret key for JWT tokens
LOG_LEVELNoLog level (default: info)
SMTP_*NoEmail configuration for password reset

⁠SMTP config env

⁠Security Notes

āš ļø For production deployments:

  • Use strong, unique passwords
  • Generate secure JWT_SECRET: openssl rand -base64 32
  • Use HTTPS with reverse proxy (Nginx/Traefik)
  • Don't expose PostgreSQL port publicly
  • Configure firewall rules

⁠Health Check

curl http://localhost:3000/api/health

⁠Documentation


Built with Rust šŸ¦€ | Powered by PostgreSQL 🐘

Tag summary

Content type

Image

Digest

sha256:5969e078c…

Size

47 MB

Last updated

9 months ago

docker pull jonatasoli/keyrunes