This guide describes how to run the Legend backend services using Docker Compose from the legend-docker installers for local Studio development.
The Docker Compose configuration resides in the legend repository. You need to check this out into a .legend-docker directory at the root of the legend-studio project if it is not already present.
Run this from the legend-studio root:
git clone https://github.com/finos/legend.git .legend-docker- Navigate to the installers directory:
cd .legend-docker/installers/docker-compose
- Configure Environment:
Modify the
.legend-docker/installers/docker-compose/.envfile . a. Ensure you have the correct image versions and names:- Engine: Use
ENGINE_IMAGE_NAME=finos/legend-engine-server-http-serverandENGINE_IMAGE_VERSION=snapshot(or a stable tag like4.113.0). - SDLC: Use
SDLC_IMAGE_VERSION=snapshot(or0.195.0). - GitLab: Configure
GITLAB_APP_IDandGITLAB_APP_SECRET.
- Engine: Use
Legend SDLC uses GitLab for OAuth. If you receive a 403 "Authorization required" error when accessing APIs or Legend Studio:
- Visit the authorization endpoint in your browser: http://localhost:6100/api/auth/authorize
- Authorize the application: You will be redirected to GitLab. Log in if necessary and click Authorize.
- Return to Studio: Once redirected back to a "Success" message or the SDLC API, you can refresh Legend Studio (usually at
http://localhost:9000/studio).
To bring up all backend services required for Legend Studio:
docker compose --profile studio up -dIf you are running Legend Studio locally (via yarn dev) and only need the backend services (like Engine and SDLC):
docker compose --profile engine --profile sdlc up -dTo pull the latest versions of the images before starting:
docker compose --profile studio pull
docker compose --profile studio up -d --force-recreateYou can specify the path to the compose file using the -f flag:
docker compose -f .legend-docker/installers/docker-compose/docker-compose.yml --profile studio up -dYou can use one or more profiles to start the subset of services needed. e.g. for Local Studio development:
docker compose -f .legend-docker/installers/docker-compose/docker-compose.yml --profile engine --profile sdlc up -dTo stop and remove the containers, networks, and images defined in the compose file:
docker compose -f .legend-docker/installers/docker-compose/docker-compose.yml downNote
If you run from a different directory, relative paths in the compose file will resolve relative to the compose file location. You can use --project-directory to change this behavior.