Documentation
Deploying

Deploying Hi.Events

The recommended deployment method for Hi.Events is using Docker the Hi.Events Docker images. This allows you to easily deploy the application on any platform that supports Docker, such as DigitalOcean, AWS, Google Cloud, or your own server.

There are two main components to deploy: the frontend and the backend. The frontend is Node React application, while the backend is a Laravel application.

For convenience, we provide an All-in-One Docker image that contains both the frontend and backend services. This is the easiest way to deploy the application. But for more control and scalability, we recommend using separate images for the frontend and backend services.

Easiest Route: One-Click Deploy

For the simplest deployment experience, you can use one-click deploy buttons:

Deploy on DigitalOcean (opens in a new tab)

Deploy to Render (opens in a new tab)

Deploy on Railway (opens in a new tab)

Deploy on Zeabur (opens in a new tab)

For production deployments, you will need to configure a mail provider, and if you'd like to charge fees for events, you'll need to configure Stripe.

Production note

The one-click deployments are great for getting started quickly. However, for production deployments, it's recommended to carefully consider the environment variables and configurations to ensure a secure and scalable deployment.

You should also ensure the size of the server and database you are deploying is sufficient for your expected usage.

Configuring Environment Variables

To make your deployment production-worthy, you'll need to configure several environment variables, especially for Mail and Stripe integration. Here are the groups of environment variables you'll need:

Frontend Variables

Variable NameDescriptionExample
VITE_FRONTEND_URLFrontend URLhttps://your-app.com
VITE_API_URL_CLIENTAPI URL for use in the browserhttps://your-app.com/api
VITE_API_URL_SERVERAPI URL for use on serverThis is used for server-side rendering. Usually http://localhost:8000/api
VITE_STRIPE_PUBLISHABLE_KEYStripe public keypk_test_51...

Backend Variables

Mail Configuration

You can use email providers like Postmark (opens in a new tab), SendGrid (opens in a new tab), or AWS SES (opens in a new tab).

Variable NameDescriptionExample
MAIL_MAILERMail driversmtp
MAIL_HOSTMail server hostsmtp.mailtrap.io
MAIL_PORTMail server port2525
MAIL_USERNAMEMail server usernameyour-username
MAIL_PASSWORDMail server passwordyour-password
MAIL_FROM_ADDRESSMail from addressme@mywebsite.com
MAIL_FROM_NAMEMail from nameYour App Name

For more details on configuring mail settings in Laravel, refer to the Laravel Mail Documentation (opens in a new tab).

Stripe Configuration

For more information on obtaining Stripe API keys, visit the Stripe API Keys Documentation (opens in a new tab).

Variable NameDescriptionExample
STRIPE_PUBLIC_KEYStripe public keypk_test_51...
STRIPE_SECRET_KEYStripe secret keysk_test_51...
STRIPE_WEBHOOK_SECRETStripe webhook secretwhsec_...

Setting up the stripe webhook

For Stripe to work correctly, you need to set up the Stripe webhook in the Stripe dashboard.

You can set the webhook on this Stripe page: https://dashboard.stripe.com/webhooks (opens in a new tab)

The webhook URL should be https://your-app.com/api/public/webhooks/stripe.

General Configuration

Variable NameDescriptionExample
APP_KEYApplication keybase64:...
APP_SAAS_MODE_ENABLEDEnable SaaS mode.true
APP_SAAS_STRIPE_APPLICATION_FEE_PERCENTStripe application fee percentage. Only relevant in SAAS mode1.5
APP_FRONTEND_URLFrontend URLhttps://your-app.com
APP_CDN_URLCDN URLhttps://cdn.your-app.com
APP_DISABLE_REGISTRATIONDisable registrationDisables people from registering new accounts. Suggested for non-SaaS deployments.
FILESYSTEM_PUBLIC_DISKFilesystem diskDefault: s3-public. public if you're using local disk storage
FILESYSTEM_PRIVATE_DISKFilesystem diskDefault: s3-private. local if you're using local disk storage
JWT_SECRETJWT secret keybase64:...
LOG_CHANNELLog channelstderr

The APP_KEY can be generated using the following command:

echo "base64:$(openssl rand -base64 32)"

AWS Configuration

These variables are required if you'd like to use AWS S3 for file storage. You can also use other s3-compatible services like DigitalOcean Spaces (opens in a new tab).

To avoid losing files during updates or server failures, we highly recommend using cloud file storage for production deployments.

Variable NameDescriptionExample
AWS_ACCESS_KEY_IDAWS access key IDyour-access-key-id
AWS_SECRET_ACCESS_KEYAWS secret access keyyour-secret-access-key
AWS_DEFAULT_REGIONAWS regionus-west-1
AWS_PUBLIC_BUCKETAWS public bucket nameyour-public-bucket
AWS_PRIVATE_BUCKETAWS private bucket nameyour-private-bucket

Database Configuration

You can either set individual database configuration variables or use the DATABASE_URL to simplify the configuration.

Variable NameDescriptionExample
DB_CONNECTIONDatabase connection typepgsql
DB_HOSTDatabase hostyour-database-host
DB_PORTDatabase port5432
DB_DATABASEDatabase nameyour-database-name
DB_USERNAMEDatabase usernameyour-database-username
DB_PASSWORDDatabase passwordyour-database-password
DATABASE_URLDatabase URL (alternative to individual values)postgres://user:password@host:port/database

Redis Configuration

Variable NameDescriptionExample
REDIS_HOSTRedis hostyour-redis-host
REDIS_PASSWORDRedis passwordyour-redis-password
REDIS_USERRedis usernameyour-redis-username
REDIS_PORTRedis port6379
REDIS_URLRedis URLredis://user:password@host:port

Queue Configuration

Variable NameDescriptionExample
QUEUE_CONNECTIONQueue connection typeDefault: sync. Set to redis for production deployments.

Production note

For convenience, QUEUE_CONNECTION is set to sync by default. It is highly recommended to use a queue system like Redis for production deployments.

Docker Images

For those you prefer to customize the deployment process, you can use the following Docker images:

The All-in-One image contains both the frontend and backend services, while the Frontend and Backend images contain only the respective services.

While the All-in-One image is convenient and should suffice for simple deployments, it's recommended to use separate images for the frontend and backend services.