Welcome to the dependency server for SCANOSS Platform 2.0
Warning Work In Progress Warning
This repository is made up of the following components:
- ?
Environmental variables are fed in this order:
dot-env --> env.json --> Actual Environment Variable
These are the supported configuration arguments:
APP_NAME="SCANOSS Dependency Server"
APP_PORT=50051
APP_MODE=dev
APP_DEBUG=false
# The serving knowledge base. DuckDB is the production backend.
DB_DRIVER=duckdb # duckdb, sqlite or postgres
DB_PATH=/var/lib/scanoss/serving.duckdb # required by duckdb and sqlite; opened read-only
# To serve the same schema from a PostgreSQL instance instead:
# DB_DRIVER=postgres
# DB_DSN=postgres://user:pass@host/db?sslmode=disable
# The DB_* values below are only used to build a DSN when DB_DSN is empty,
# and only for the postgres driver.
# DB_HOST=localhost
# DB_USER=scanoss
# DB_PASSWD=
# DB_SCHEMA=scanoss
# DB_SSL_MODE=disable
The service reads the serving knowledge base and never writes to it.
COMP_COMMIT_MISSING, which stored live pkg.go.dev lookups back into the mining
database, is gone; the live lookup itself remains.
The dependency server can be deployed as a Docker container.
Adjust configurations by updating an .env file in the root of this repository.
You can build your own image of the SCANOSS Dependency Server with the docker build command as follows.
make ghcr_buildRun the SCANOSS Dependency Server Docker image by specifying the environmental file to be used with the --env-file argument.
You may also need to expose the APP_PORT on a given interface:port with the -p argument.
docker run -it -v "$(pwd)":"$(pwd)" -p 50051:50051 ghcr.io/scanoss/scanoss-dependencies -json-config $(pwd)/config/app-config-docker-local-dev.json -debugTo run locally on your desktop, please use the following command:
go run cmd/server/main.go -json-config config/app-config-dev.json -debugAfter changing a dependency version, please run the following command:
go mod tidy -compat=1.19https://mholt.github.io/json-to-go/
To request features or alert about bugs, please do so here.
Details of major changes to the library can be found in CHANGELOG.md.