Skip to content

Commit

Permalink
chore: Add docker npm scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenVerborgh authored and joachimvh committed Nov 4, 2020
1 parent 1055bee commit 5f4f4b0
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ services:
- docker

before_install:
# Set up SPARQL endpoint
- docker pull tenforce/virtuoso
- docker run -d -p 4000:8890 -e SPARQL_UPDATE=true tenforce/virtuoso
- npm run docker

script:
- npm run lint
Expand Down
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,21 @@
"homepage": "https://github.com/solid/community-server#readme",
"scripts": {
"build": "npm run build:ts && npm run build:components",
"build:ts": "tsc",
"build:components": "componentsjs-generator -s src",
"build:ts": "tsc",
"docker": "npm run docker:setup && npm run docker:start",
"docker:clean": "./test/docker/docker-clean.sh",
"docker:setup": "./test/docker/docker-setup.sh",
"docker:start": "./test/docker/docker-start.sh",
"docker:stop": "./test/docker/docker-stop.sh",
"jest": "jest",
"lint": "eslint . --ext .ts --cache",
"prepare": "npm run build",
"start": "node ./bin/server.js -p 3000",
"test": "npm run jest",
"jest": "jest",
"test:unit": "jest test/unit",
"test:integration": "jest --coverageThreshold '{}' test/integration",
"test:deploy": "test/deploy/validate-package.sh",
"test:integration": "jest --coverageThreshold '{}' test/integration",
"test:unit": "jest test/unit",
"validate": "componentsjs-compile-config urn:solid-server:default -c config/config-default.json -f > /dev/null",
"version": "manual-git-changelog onversion",
"watch": "nodemon --watch \"src/**/*.js\" --watch \"bin/**/*.js\" --exec npm start"
Expand Down
2 changes: 2 additions & 0 deletions test/docker/docker-clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
docker rm -f css-virtuoso
6 changes: 6 additions & 0 deletions test/docker/docker-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
docker pull tenforce/virtuoso
docker container create --name css-virtuoso \
-p 4000:8890 \
-e SPARQL_UPDATE=true \
tenforce/virtuoso
2 changes: 2 additions & 0 deletions test/docker/docker-start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
docker start css-virtuoso
2 changes: 2 additions & 0 deletions test/docker/docker-stop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
docker stop css-virtuoso

0 comments on commit 5f4f4b0

Please sign in to comment.