Backend service for FastAPI RBAC project.
2.3K
This Docker image contains the backend service for the FastAPI RBAC (Role-Based Access Control) project. It provides the core API functionalities, user management, authentication, and authorization.
Project Source Code: https://github.com/mnaimfaizy/fastapi_rbac
latest: The latest build from the main branch.vX.Y.Z (e.g., v1.0.0): Stable release versions.vX.Y.Z-beta.N (e.g., v0.1.0-beta.1): Pre-release versions.Refer to the GitHub repository tags for a full list of available version tags.
# Example:
docker run -d \
--name rbac_backend \
-p 8000:8000 \
-e DATABASE_USER=your_db_user \
-e DATABASE_PASSWORD=your_db_password \
-e DATABASE_HOST=your_db_host \
-e DATABASE_PORT=5432 \
-e DATABASE_NAME=your_db_name \
-e REDIS_HOST=your_redis_host \
-e REDIS_PORT=6379 \
-e REDIS_PASSWORD=your_redis_password \
-e SECRET_KEY=a_very_strong_and_unique_secret_key \
-e ACCESS_TOKEN_EXPIRE_MINUTES=30 \
-e REFRESH_TOKEN_EXPIRE_DAYS=7 \
-e [email protected] \
-e FIRST_SUPERUSER_PASSWORD=changethispassword \
# Add other necessary environment variables as per backend/.env.example
mnaimfaizy/fastapi-rbac-backend:latest # Or a specific version tag like :v1.0.0
This image is configured using environment variables. For a comprehensive list and their default values (if any), please refer to the backend/.env.example file in the source repository. The file contains both development and production configurations with clear guidance for each environment.
Key variables include:
DATABASE_USER, DATABASE_PASSWORD, DATABASE_HOST, DATABASE_PORT, DATABASE_NAMEREDIS_HOST, REDIS_PORT, REDIS_PASSWORDSECRET_KEY: Critical for security. A strong, unique key for signing JWTs.ACCESS_TOKEN_EXPIRE_MINUTESREFRESH_TOKEN_EXPIRE_DAYSFIRST_SUPERUSER_EMAILFIRST_SUPERUSER_PASSWORDAPI_V1_STR (default: /api/v1)PROJECT_NAME (default: FastAPI RBAC)EMAILS_ENABLED (set to True to enable)SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD, SMTP_TLSEMAILS_FROM_EMAIL, EMAILS_FROM_NAMEBACKEND_CORS_ORIGINS: Comma-separated list of allowed origins (e.g., http://localhost:5173,https://yourdomain.com).RUN_MIGRATIONS is set to true (default)./app/logs), you can mount a volume to persist them:
# Example:
docker run -d \
# ... other options ...
-v my_backend_logs:/app/logs \
mnaimfaizy/fastapi-rbac-backend:latest
For more detailed information on the project setup, API endpoints, and architecture, please refer to the main README.md and other documentation in the source code repository.
Content type
Image
Digest
sha256:ebb8cd4b6…
Size
275.2 MB
Last updated
3 months ago
docker pull mnaimfaizy/fastapi-rbac-backend