Service to generate sourcify chain stats
- POSTGRES_HOST: Database host
- POSTGRES_DATABASE: Database name
- POSTGRES_USER: Database user
- POSTGRES_PASSWORD: Database password
- POSTGRES_PORT: Database port
- REPOV1_PATH: Path to repositoryV1
- REPOV2_PATH: Path to repositoryV2
-
Copy .env.template to .env and fill values
-
Install dependencies
npm install
- Build
npm run build
- Run
npm start
- Build image
docker build -t statsgen .
- Run container
docker run -v /path/to/sourcify/repositories:/repositories -e POSTGRES_HOST=host.docker.internal -e POSTGRES_DATABASE=sourcify-staging -e POSTGRES_USER=xxxxx -e POSTGRES_PASSWORD=xxxxx -e POSTGRES_PORT=5432 -e REPOV1_PATH=/repositories/repoV1 -e REPOV2_PATH=/repositories/repoV2 statsgen