Skip to content

Commit 7116efa

Browse files
committed
wip
Signed-off-by: Nell Shamrell <[email protected]>
1 parent f5c550f commit 7116efa

File tree

7 files changed

+27
-78
lines changed

7 files changed

+27
-78
lines changed

definitions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{ "_id" : "npm/npmjs/-/glob/7.1.0", "files" : [ { "path" : "package/LICENSE", "license" : "ISC", "attributions" : [ "Copyright (c) Isaac Z. Schlueter and Contributors" ], "hashes" : { "sha1" : "bb408e929caeb1731945b2ba54bc337edb87cc66" }, "token" : "4ec3d4c66cd87f5c8d8ad911b10f99bf27cb00cdfcff82621956e379186b016b" }, { "path" : "package/common.js" }, { "path" : "package/sync.js" }, { "path" : "package/glob.js" }, { "path" : "package/package.json", "license" : "ISC", "hashes" : { "sha1" : "ab507fdc88183a8c4c26ca740a5d67f7c7c2c809" } }, { "path" : "package/README.md" }, { "path" : "package/changelog.md" } ], "described" : { "releaseDate" : "2016-09-20", "sourceLocation" : { "type" : "git", "provider" : "github", "namespace" : "isaacs", "name" : "node-glob", "revision" : "f65f9eb7eda113528c5257b58fac4ca685ee6c4f", "url" : "https://github.com/isaacs/node-glob/tree/f65f9eb7eda113528c5257b58fac4ca685ee6c4f" }, "projectWebsite" : "https://github.com/isaacs/node-glob#readme", "issueTracker" : "https://github.com/isaacs/node-glob/issues", "tools" : [ "clearlydefined/1.1.3", "scancode/2.9.2", "fossology/3.3.0" ], "toolScore" : { "total" : 100, "date" : 30, "source" : 70 }, "score" : { "total" : 100, "date" : 30, "source" : 70 } }, "licensed" : { "declared" : "ISC", "toolScore" : { "total" : 64, "declared" : 30, "discovered" : 4, "consistency" : 15, "spdx" : 15, "texts" : 0 }, "facets" : { "core" : { "attribution" : { "unknown" : 6, "parties" : [ "Copyright (c) Isaac Z. Schlueter and Contributors" ] }, "discovered" : { "unknown" : 5, "expressions" : [ "ISC" ] }, "files" : 7 } }, "score" : { "total" : 64, "declared" : 30, "discovered" : 4, "consistency" : 15, "spdx" : 15, "texts" : 0 } }, "coordinates" : { "type" : "npm", "provider" : "npmjs", "name" : "glob", "revision" : "7.1.0" }, "_meta" : { "schemaVersion" : "1.3.0", "updated" : "2019-01-10T21:43:52.112Z" } }]

docker-compose.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ services:
1515
ports:
1616
- "4000:4000"
1717
env_file: .env
18+
links:
19+
- clearlydefined_mongo_db
1820
# crawler:
1921
# build: ../crawler
2022
# env_file: .env
@@ -32,20 +34,11 @@ services:
3234
image: "mongo:latest"
3335
ports:
3436
- "27017:27017"
35-
networks:
36-
- dev
37-
environment:
38-
- MONGO_INITDB_DATABASE=clearlydefined
39-
- MONGO_INITDB_ROOT_USERNAME=admin
40-
- MONGO_INITDB_ROOT_PASSWORD=secret
41-
definitions_seed:
42-
build: ./definitions_seed
43-
networks:
44-
- dev
45-
depends_on:
46-
- clearlydefined_mongo_db
37+
volumes:
38+
- mongo-data:/data/db:cached
39+
- ./deploy/local/mongo_data:/mongo_data
40+
- ./deploy/local/mongo_import.sh:/docker-entrypoint-initdb.d/mongo_import.sh
4741

48-
networks:
49-
dev:
50-
name: dev
51-
driver: bridge
42+
volumes:
43+
mongo-data:
44+
driver: local

init-mongo.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
db.createUser(
2+
{
3+
user : "admin",
4+
pwd : "secret",
5+
roles : [
6+
{
7+
role : "readWrite",
8+
db : "clearlydefined"
9+
}
10+
]
11+
}
12+
)

mongo_data/definitions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{ "_id" : "npm/npmjs/-/glob/7.1.0", "files" : [ { "path" : "package/LICENSE", "license" : "ISC", "attributions" : [ "Copyright (c) Isaac Z. Schlueter and Contributors" ], "hashes" : { "sha1" : "bb408e929caeb1731945b2ba54bc337edb87cc66" }, "token" : "4ec3d4c66cd87f5c8d8ad911b10f99bf27cb00cdfcff82621956e379186b016b" }, { "path" : "package/common.js" }, { "path" : "package/sync.js" }, { "path" : "package/glob.js" }, { "path" : "package/package.json", "license" : "ISC", "hashes" : { "sha1" : "ab507fdc88183a8c4c26ca740a5d67f7c7c2c809" } }, { "path" : "package/README.md" }, { "path" : "package/changelog.md" } ], "described" : { "releaseDate" : "2016-09-20", "sourceLocation" : { "type" : "git", "provider" : "github", "namespace" : "isaacs", "name" : "node-glob", "revision" : "f65f9eb7eda113528c5257b58fac4ca685ee6c4f", "url" : "https://github.com/isaacs/node-glob/tree/f65f9eb7eda113528c5257b58fac4ca685ee6c4f" }, "projectWebsite" : "https://github.com/isaacs/node-glob#readme", "issueTracker" : "https://github.com/isaacs/node-glob/issues", "tools" : [ "clearlydefined/1.1.3", "scancode/2.9.2", "fossology/3.3.0" ], "toolScore" : { "total" : 100, "date" : 30, "source" : 70 }, "score" : { "total" : 100, "date" : 30, "source" : 70 } }, "licensed" : { "declared" : "ISC", "toolScore" : { "total" : 64, "declared" : 30, "discovered" : 4, "consistency" : 15, "spdx" : 15, "texts" : 0 }, "facets" : { "core" : { "attribution" : { "unknown" : 6, "parties" : [ "Copyright (c) Isaac Z. Schlueter and Contributors" ] }, "discovered" : { "unknown" : 5, "expressions" : [ "ISC" ] }, "files" : 7 } }, "score" : { "total" : 64, "declared" : 30, "discovered" : 4, "consistency" : 15, "spdx" : 15, "texts" : 0 } }, "coordinates" : { "type" : "npm", "provider" : "npmjs", "name" : "glob", "revision" : "7.1.0" }, "_meta" : { "schemaVersion" : "1.3.0", "updated" : "2019-01-10T21:43:52.112Z" } }]

mongo_import.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
mongoimport --db clearlydefined --collection definitions --file mongo_data/definitions.json

sample_data/349

Lines changed: 0 additions & 61 deletions
This file was deleted.

walkthrough.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ And let's add the appropriate info to the .env file:
196196
```bash
197197
CURATION_GITHUB_TOKEN="<Your GitHub Personal Access Token>"
198198

199-
DEFINITION_MONGO_CONNECTION_STRING="mongodb://admin:secret@localhost:27018/definitions-dev-docker"
199+
DEFINITION_MONGO_CONNECTION_STRING="mongodb://admin:secret@localhost:27017/definitions-dev-docker"
200200
DEFINITION_STORE_PROVIDER="mongo"
201201
DEFINITION_MONGO_COLLECTION_NAME="definitions-paged"
202202
```

0 commit comments

Comments
 (0)