Run service using pre-built Docker image
How to download and run pre-built LPVS Docker images without building the LPVS project.
Setting up LPVS Docker environment variables
For the Docker deployment scenario, you need to provide database credentials and GitHub settings before starting the containers.
-
Copy
.env.exampleto.envin the same directory asdocker-compose.yml, and fill in strong, unique values forMYSQL_ROOT_PASSWORD,MYSQL_PASSWORDandLPVS_GITHUB_SECRET:cp .env.example .envdocker composerefuses to start if these are left empty, so there is no insecure default to forget to change.MYSQL_USERdefaults tolpvs, a dedicated database account scoped to thelpvsschema only — the application does not need and does not use the MySQLrootaccount.
Warning
Never commit .env to version control, and do not publish MySQL's port
(3306) to the host unless you have a specific need for external access —
the default docker-compose.yml keeps it internal to the lpvs network.
-
Open
docker-compose.ymlfile. -
In the
environmentpart of thelpvsservice, find## Github data for fetching codeand fill in the GitHubloginand personaltokenthat was generated earlier.- github.login=<github-login> - github.token=<personal-token> -
You can also change the directory for storing MySQL data by modifying the following line:
- ./mysql-lpvs-data:/var/lib/mysql
Info
Database storage by default is a directory in the root of the repository with
the name mysql-lpvs-data.
Running and stopping LPVS and MySQL Docker images
Start the LPVS services using docker compose:
docker compose up -d
Stop the LPVS services using docker compose:
docker compose down
You can now create a new pull request or update an existing one with commits. If webhook was configured correctly, LPVS will automatically start scanning and provide comments about the licenses and conflicts found in the project.