See the Helm chart guide for installing Uffizzi on your own Kubernetes cluster.
Once Uffizzi is installed, you can use the Uffizzi CLI to create and manage previews. Additionally, you can continuously deploy previews of your branches using the GitHub Action.
Uffizzi consists of the following components:
- Uffizzi App (this repository) - The primary REST API for creating and managing Previews
- Uffizzi Controller - A smart proxy service that handles requests from Uffizzi App to the Kubernetes API
- Uffizzi CLI - A command-line interface for Uffizzi App
Uffizzi App requires the following external dependencies:
- Kubernetes (k8s) cluster
- PostgreSQL database
- Redis cache
This uffizzi_app
acts as a REST API for uffizzi_cli
interface. It requires uffizzi_controller
as a supporting service.
RAILS_SECRET_KEY_BASE
- secret_key_base of Rails::ApplicationDATABASE_HOST
- the database hostname (default: 127.0.0.1)DATABASE_USER
- the database username (default: postgres)DATABASE_PASSWORD
- the database passwordDATABASE_PORT
- the database port (default: 5432)BUNDLE_PATH
- the location of gems forbundle install
command (not required)GEM_PATH
- the location where gems can be found (not required)GEM_HOME
- where gems will be installed (not required)RAILS_WORKERS_COUNT
- the number ofpuma
workers (default: 18)RAILS_THREADS_COUNT
- the number ofpuma
threads (default: 5)RAILS_PORT
- thepuma
port (default: 7000)RAILS_ENV
- the rails environment (default: development)SIDEKIQ_CONCURRENCY
- sidekiq concurrency (default: 5)ALLOWED_HOSTS
- allowed hosts for rails app used for Rack::Cors (default: [])APP_URL
- URL of the applicationREDIS_URL
- URL of a Redis serverCONTROLLER_URL
- URL of the controller application (default: http://controller:8080)CONTROLLER_LOGIN
- the login of the controller application (default: '')CONTROLLER_PASSWORD
- the password of the controller application (default: '')
If you want to run Uffizzi on your workstation instead of using the Helm chart, then you can run it using Docker Compose.
docker-compose run --rm web bash -c "bundle install && bundle exec rails db:setup"
docker-compose up
Run the following command and follow instructions:
docker-compose run --rm web bash -c "rake uffizzi_core:create_user"
or run the command with environment variables:
UFFIZZI_USER_EMAIL
- user's emailUFFIZZI_USER_PASSWORD
- user's passwordUFFIZZI_PROJECT_NAME
- user's project name
docker-compose run --rm -e [email protected] -e UFFIZZI_USER_PASSWORD=password -e UFFIZZI_PROJECT_NAME=project web bash -c "rake uffizzi_core:create_user"
docker-compose run --rm gem bash
bundle exec uffizzi login --hostname http://web:7000 -u [email protected]
Rebuild documentation locally:
docker-compose run --rm core bash
bundle exec rake core:generate_docs
The default health check uri is health_check
. To use a custom uri please add the HEALTH_CHECK_URI
environment variable to the docker-compose.yml