Unverified Commit 4096b336 authored by Isuru Liyanage's avatar Isuru Liyanage Committed by GitHub
Browse files

Merge pull request #12 from elixir-europe/docker-integration

add correct dockerfile and start script
parents 295a0a85 8c9b163f
Pipeline #149473 failed with stage
in 35 seconds
FROM node:carbon FROM node:12.22.0-buster
# Create app directory # Create app directory
WORKDIR /usr/src/app WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./ COPY package*.json ./
COPY ./start.sh /
RUN npm install RUN npm install
# Bundle app source # Bundle app source
COPY . . COPY . .
EXPOSE 3000 ENTRYPOINT ["/start.sh"]
CMD [ "npm", "start" ] \ No newline at end of file
\ No newline at end of file
...@@ -371,6 +371,23 @@ JSON object: ...@@ -371,6 +371,23 @@ JSON object:
} }
``` ```
## Running in Docker
Dockerized version of BioValidator is available in [quay.io](https://quay.io/repository/ebi-ait/biovalidator).
These images can be used to run the validator without cloning this repository.
Pull docker image from [quay.io](https://quay.io/repository/ebi-ait/biovalidator)
docker pull quay.io/ebi-ait/biovalidator:1.0.0
Run in server mode
docker run -p 3020:3020 -d quay.io/ebi-ait/biovalidator:1.0.0 --server
Run in onetime mode
docker run quay.io/ebi-ait/biovalidator:1.0.0 --schema /path/to/schema.json --json /path/to/json.json
## License ## License
For more details about licensing see the [LICENSE](LICENSE.md). For more details about licensing see the [LICENSE](LICENSE.md).
{ {
"name": "json-schema-validator", "name": "biovalidator",
"version": "1.8.0", "version": "1.9.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
{ {
"name": "json-schema-validator", "name": "biovalidator",
"version": "1.8.0", "version": "1.9.0",
"description": "A nodejs JSON schema validator service.", "description": "A nodejs JSON schema validator service.",
"main": "src/server.js", "main": "src/server.js",
"repository": "https://github.com/EMBL-EBI-SUBS/json-schema-validator.git", "repository": "https://github.com/elixir-europe/biovalidator.git",
"scripts": { "scripts": {
"start": "node src/server.js", "start": "node src/server.js",
"test": "jest", "test": "jest",
while [ $# -gt 0 ]; do
case "$1" in
printf "*********************************************************************************\n"
printf "* Error, invalid arguments. Valid arguments are \n"
printf "* --server to run in server mode\n"
printf "* --schema /path/to/schema --json /path/to/json to validate json against schema \n"
printf "*********************************************************************************\n"
exit 1
if [ $server = true ]
printf "Running validator in server mode \n"
node src/server.js
printf "Running validator in onetime validation mode with params schema=%s json=%s \n" "$schema" "$json"
node validator-cli.js --schema="$schema" --json="$json"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment