Coolify
LeafLock ships with a docker-compose.coolify.yml
that Coolify understands out of the box. Follow these steps to bring the app online without repeating what other pages already explain.
Before You Begin
Section titled “Before You Begin”- Coolify 4.x installed with Docker access
- Git repository containing this project (or a fork)
- Domain pointed at your Coolify host if you want HTTPS
- Shell access to generate secrets with
openssl
Step 1 – Create the Resource
Section titled “Step 1 – Create the Resource”- In Coolify, choose New Resource → Docker Compose → From Git Repository.
- Point it at your LeafLock repo and branch.
- Set Compose file to
docker-compose.coolify.yml
(no build command needed). - Give the project a name (for example
leaflock
) and assign your domain if you have one.
Coolify will now watch the repository and rebuild whenever you redeploy.
Step 2 – Configure Environment Variables
Section titled “Step 2 – Configure Environment Variables”Add the following variables in the Environment tab before the first deploy. Values shown here are examples—replace them with secrets you generate yourself.
Core Services
Section titled “Core Services”# PostgreSQLPOSTGRES_PASSWORD=$(openssl rand -base64 32)DATABASE_URL=postgres://postgres:${POSTGRES_PASSWORD}@postgres:5432/notes?sslmode=prefer
# RedisREDIS_PASSWORD=$(openssl rand -base64 32)REDIS_URL=redis:6379
Application Secrets and Runtime Options
Section titled “Application Secrets and Runtime Options”# SecurityJWT_SECRET=$(openssl rand -base64 64)SERVER_ENCRYPTION_KEY=$(openssl rand -base64 32)
# HTTP + CORSPORT=8080CORS_ORIGINS=https://leaflock.example.comVITE_API_URL=https://leaflock.example.com/api/v1
# App behaviourAPP_ENV=productionENABLE_REGISTRATION=falseENABLE_DEFAULT_ADMIN=trueDEFAULT_ADMIN_EMAIL=admin@leaflock.example.comDEFAULT_ADMIN_PASSWORD=$(openssl rand -base64 24)LeafLock!
Add any optional flags (metrics, additional admins, etc.) exactly as you would for other deployments. Keeping everything in Coolify’s environment editor makes redeploys painless.
Step 3 – Deploy
Section titled “Step 3 – Deploy”Hit Deploy. Coolify will:
- Pull the repository
- Build the images defined in
docker-compose.coolify.yml
- Start PostgreSQL → Redis → backend → frontend
- Run the configured health checks
You should see all services turn green once the containers finish booting.
Step 4 – Verify the Installation
Section titled “Step 4 – Verify the Installation”Run these checks from your workstation:
# Frontend should serve the appcurl -I https://leaflock.example.com/
# Backend health endpoint should respond with JSONcurl https://leaflock.example.com/api/v1/health
If you use a custom domain, confirm that Coolify issued a certificate and that CORS_ORIGINS
matches the URL you expect your users to visit.
Ongoing Maintenance
Section titled “Ongoing Maintenance”- Pull upstream changes, then trigger redeploys from Coolify.
- Rotate the secrets above on a schedule—Coolify keeps previous values so you can roll them back if needed.
- Watch container logs inside the Coolify UI when debugging issues.
- For platform-specific problems, check the dedicated Troubleshooting section.
That’s it—no secondary “setup” document required.