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.
- Get the docker compose file
curl -o docker-compose.yml https://raw.githubusercontent.com/getlago/lago/main/deploy/docker-compose.local.yml- Run the following command to start the project:
docker compose up --profile all # If you want to run it in the background docker compose up -d --profile allThis configuration provide Traefik as a reverse proxy to ease your deployment. It supports SSL with Let's Encrypt.
- Get the docker compose file
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- Replace the .env values with yours
LAGO_DOMAIN=domain.tld LAGO_ACME_EMAIL=email@domain.tld- Run the following command to start the project
docker compose up --profile all # If you want to run it in the background docker compose up -d --profile allThis configuration provide Traefik as a reverse proxy to ease your deployment. It supports SSL wth Let's Encrypt.
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- Replace the .env values with yours
LAGO_DOMAIN=domain.tld LAGO_ACME_EMAIL=email@domain.tld PORTAINER_USER=lago PORTAINER_PASSWORD=changeme- Run the following command to start the project
docker compose up --profile all # If you want to run it in the background docker compose up -d --profile allThe 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 service
This 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 upIt is possible to disable the usage of the PostgreSQL database to use an external database instance.
- Set those environment variables:
POSTGRES_USERPOSTGRES_PASSWORDPOSTGRES_DBPOSTGRES_HOSTPOSTGRES_PORTPOSTGRES_SCHEMAoptional
- Run the following command to start the project without PostgreSQL:
docker compose up --profile all-no-pgIt is possible to disable the usage of the Redis database to use an external Redis instance.
- Set those environment variables:
REDIS_HOSTREDIS_PORTREDIS_PASSWORDoptional
- Run the following command to start the project without Redis:
docker compose up --profile all-no-redisThose 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:
- Remove the
lago_rsa_datavolume - Generate your own key using
openssl genrsa 2048 | base64 | tr -d '\n' - Export this generated key to the
LAGO_RSA_PRIVATE_KEYenv var. - Run the following command to start the project without the RSA keys generation:
docker compose up --profile all-no-keysAll BE Services use the same RSA key, they will exit immediately if no key is provided.