Download docker-compose.yml and env.example from the latest release into a folder.
Rename env.example to .env. For Mac/Linux users, please run mv env.example .env in the terminal. This file contains the environment variables that the Devlake server will use. Additional ones can be found in the compose file(s).
Generate a secure encryption key using a method such as OpenSSL. For example, run the following command to generate a 128-character string consisting of uppercase letters:
openssl rand -base64 2000 | tr -dc 'A-Z' | fold -w 128 | head -n 1
Copy the generated string. Set the value of the ENCRYPTION_SECRET environment variable:
Method 1: In a terminal session, run the following command: export ENCRYPTION_SECRET=“copied string”
Method 2: Alternatively, you can set the ENCRYPTION_SECRET environment variable in the .env file: ENCRYPTION_SECRET=“copied string”
If you set the ENCRYPTION_SECRET environment variable in both the terminal session and the .env file, the value set in the terminal session takes precedence.
Please make sure to keep the ENCRYPTION_SECRET safe as it is used to encrypt sensitive information in the database, such as personal access tokens and passwords. If ENCRYPTION_SECRET is lost, it may not be possible to decrypt this sensitive information.
Run docker-compose up -d if the version of Docker Desktop is too low to use docker compose up -d.
http://localhost:4000 in your browser to configure DevLake and collect data.localhost:3002 (username: “admin”, password: “admin”).Please note: Back up your Grafana dashboards before upgrade if you have modified/customized any dashboards. You can re-import these dashboards to Grafana after the upgrade.
docker-compose down to stop services;docker-compose up -d to start DevLake services.Yes, please follow the steps below:
docker-compose.yml:mysql: image: mysql:8 volumes: - mysql-storage:/var/lib/mysql restart: always ports: - "127.0.0.1:3306:3306" environment: MYSQL_ROOT_PASSWORD: admin MYSQL_DATABASE: lake MYSQL_USER: merico MYSQL_PASSWORD: merico command: --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
docker-compose.yml:volumes: mysql-storage:
docker-compose.yml:depends_on: - mysql
docker-compose.yml:MYSQL_URL: 123.45.67.89:3306 MYSQL_DATABASE: mydatabase MYSQL_USER: myuser MYSQL_PASSWORD: mypassword
.env:DB_URL="mysql://YOUR_USER:YOUR_PASSWORD@YOUR_IP:YOUR_PORT/lake?charset=utf8mb4&parseTime=True" # Don't forget to create db named `lake` in your own db, and set character-set-server=utf8mb4, collation-server=utf8mb4_bin as below # character-set-server=utf8mb4 # collation-server=utf8mb4_bin
docker compose up -dYes, please follow the steps below:
grafana: image: mericodev/devlake-dashboard:latest build: context: grafana/ ports: - "3002:3000" volumes: - grafana-storage:/var/lib/grafana environment: GF_SERVER_ROOT_URL: "http://localhost:4000/grafana" GF_USERS_DEFAULT_THEME: "light" MYSQL_URL: mysql:3306 MYSQL_DATABASE: lake MYSQL_USER: merico MYSQL_PASSWORD: merico restart: always depends_on: - mysql
volumes: grafana-storage:
config-ui container to adopt the external Grafana in the docker-compose.ymlconfig-ui: ... environment: USE_EXTERNAL_GRAFANA: "true" GRAFANA_ENDPOINT: "http://grafana.example.com" ...
Please connect your Grafana to DevLake's database by following https://grafana.com/docs/grafana/latest/administration/data-source-management/
If you want to import dashboards, please check https://grafana.com/docs/grafana/latest/dashboards/export-import/.
docker compose up -dIf you run into any problem, please check the Troubleshooting or create an issue