Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 3 additions & 21 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Installation
Requirements
############
* Debian-based Linux distribution
* Python 3.8 or later
* Python 3.11 or later
* Postgres 13
* git
* scancode-toolkit runtime dependencies (https://scancode-toolkit.readthedocs.io/en/stable/getting-started/install.html#install-prerequisites)
Expand Down Expand Up @@ -89,23 +89,6 @@ variables will have to be set for the scan queue commands to work:
SCANCODEIO_URL=<ScanCode.io API URL>
SCANCODEIO_API_KEY=<ScanCode.io API Key>

The scan queue is run using two commands:
::

make request_scans

``request_scans`` will send a Package scan request to a configured ScanCode.io
instance. ScanCode.io will download, extract, and scan the files of the
requested Package.
::

make process_scans

``process_scans`` will poll ScanCode.io for the status of the Package scans
requested by ``request_scans``. When a Package scan on ScanCode.io is ready,
``process_scans`` will use that data to create Resources and populate the
MatchCode directory fingerprint indices.

Package Resource data can also be gathered by running ClearCode, where Package
scan data from clearlydefined is collected and its results are used to create
Packages and Resources.
Expand Down Expand Up @@ -206,9 +189,8 @@ All requests to the host go to the PurlDB service, but requests that go to the
To run PurlDB and Matchcode.io with Docker:
::

docker compose -f docker-compose_traefik.yml up -d
docker compose -f docker-compose_purldb.yml up -d
docker compose -f docker-compose_matchcodeio.yml up -d
docker compose -f docker-compose.yml up -d
docker compose -f docker-compose.matchcodeio.yml up -d

Funding
-------
Expand Down
21 changes: 2 additions & 19 deletions docker-compose_purldb.yml → docker-compose.common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ services:
clearindex:
build: .
command: wait-for-it web:8000 -- python manage_purldb.py run_clearindex
env_file:
- docker_purldb.env
profiles:
- clearsync
depends_on:
Expand Down Expand Up @@ -120,25 +122,6 @@ services:
- db
- web

nginx:
image: nginx
labels:
- "traefik.enable=true"
- "traefik.http.routers.web.rule=
Host(`127.0.0.1`)
|| Host(`localhost`)"
- "traefik.http.routers.web.entrypoints=web"
volumes:
- ./etc/nginx/conf.d/:/etc/nginx/conf.d/
- static:/var/purldb/static/
depends_on:
- web

networks:
default:
name: purldb
external: true

volumes:
db_data:
static:
Expand Down
File renamed without changes.
35 changes: 35 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: "3.7"

include:
- docker-compose.common.yml

services:
nginx:
image: nginx
labels:
- "traefik.enable=true"
- "traefik.http.routers.web.rule=
Host(`127.0.0.1`)
|| Host(`localhost`)"
- "traefik.http.routers.web.entrypoints=web"
volumes:
- ./etc/nginx/conf.d/:/etc/nginx/conf.d/
- static:/var/purldb/static/
depends_on:
- web

traefik:
image: "traefik:v2.10"
container_name: "traefik"
hostname: "traefik"
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./traefik.yml:/traefik.yml:ro"

networks:
default:
name: purldb
external: true
111 changes: 0 additions & 111 deletions docker-compose_purldb_public.yml

This file was deleted.

18 changes: 0 additions & 18 deletions docker-compose_traefik.yml

This file was deleted.

19 changes: 0 additions & 19 deletions manage_purldb_public.py

This file was deleted.

28 changes: 28 additions & 0 deletions packagedb/migrations/0085_alter_packagerelation_relationship.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 5.0.4 on 2024-04-19 01:29

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
(
"packagedb",
"0084_alter_resource_file_type_alter_resource_mime_type_and_more",
),
]

operations = [
migrations.AlterField(
model_name="packagerelation",
name="relationship",
field=models.CharField(
choices=[
("source_package", "Source Package"),
("binary_package", "Binary Package"),
],
help_text='Relationship between the from and to package URLs such as "source_package" when a package is the source code package for another package.',
max_length=30,
),
),
]