deploy/README.md
This repository contains the necessary files to deploy the Lago project.
To deploy the project locally, you need to have Docker and Docker Compose installed on your machine. This configuration can be used for small production usages but it's not recommended for large scale deployments.
curl -o docker-compose.yml https://raw.githubusercontent.com/getlago/lago/main/deploy/docker-compose.local.yml
docker compose up --profile all
# If you want to run it in the background
docker compose up -d --profile all
This configuration provide Traefik as a reverse proxy to ease your deployment. It supports SSL with Let's Encrypt. :warning: You need a valid domain (with at least one A or AAA record)!
curl -o docker-compose.yml https://raw.githubusercontent.com/getlago/lago/main/deploy/docker-compose.light.yml
curl -o .env https://raw.githubusercontent.com/getlago/lago/main/deploy/.env.light.example
LAGO_DOMAIN=domain.tld
[email protected]
docker compose up --profile all
# If you want to run it in the background
docker compose up -d --profile all
This configuration provide Traefik as a reverse proxy to ease your deployment. It supports SSL wth Let's Encrypt. :warning: You need a valid domain (with at least one A or AAA record)! It also adds multiple services that will help your to handle more load. Portainer is also packed to help you scale services and manage your Lago stack.
curl -o docker-compose.yml https://raw.githubusercontent.com/getlago/lago/main/deploy/docker-compose.production.yml
curl -o .env https://raw.githubusercontent.com/getlago/lago/main/deploy/.env.production.example
LAGO_DOMAIN=domain.tld
[email protected]
PORTAINER_USER=lago
PORTAINER_PASSWORD=changeme
docker compose up --profile all
# If you want to run it in the background
docker compose up -d --profile all
The docker compose file contains multiple profiles to enable or disable some services. Here are the available profiles:
all: Enable all servicesall-no-pg: Disable the PostgreSQL serviceall-no-redis: Disable the Redis serviceall-no-keys: Disable the RSA keys generation serviceThis allow you to start only the service you want to use, please see the following sections for more information.
# Start all services
docker compose up --profile all
# Start without PostgreSQL
docker compose up --profile all-no-pg
# Start without Redis
docker compose up --profile all-no-redis
# Start without PostgreSQL and Redis
docker compose up --profile all-no-db
# Start without RSA keys generation
docker compose up --profile all-no-keys
# Start without PostgreSQL, Redis and RSA keys generation
docker compose up
It is possible to disable the usage of the PostgreSQL database to use an external database instance.
POSTGRES_USERPOSTGRES_PASSWORDPOSTGRES_DBPOSTGRES_HOSTPOSTGRES_PORTPOSTGRES_SCHEMA optionaldocker compose up --profile all-no-pg
It is possible to disable the usage of the Redis database to use an external Redis instance.
REDIS_HOSTREDIS_PORTREDIS_PASSWORD optionaldocker compose up --profile all-no-redis
Those docker compose file generates an RSA Keys pair for the JWT tokens generation.
You can find the keys in the lago_rsa_data volume or in the /app/config/keys directory in the backends containers.
If you do not want to use those keys:
lago_rsa_data volumeopenssl genrsa 2048 | openssl base64 -ALAGO_RSA_PRIVATE_KEY env var.docker compose up --profile all-no-keys
All BE Services use the same RSA key, they will exit immediately if no key is provided.
For production deployments, we recommend setting up monitoring for Sidekiq workers. See the Monitoring documentation for: