Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
AIT
biovalidator
Commits
4096b336
Unverified
Commit
4096b336
authored
Apr 21, 2021
by
Isuru Liyanage
Committed by
GitHub
Apr 21, 2021
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
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
11 deletions
+61
-11
Dockerfile
Dockerfile
+3
-6
README.md
README.md
+17
-0
package-lock.json
package-lock.json
+2
-2
package.json
package.json
+3
-3
start.sh
start.sh
+36
-0
No files found.
Dockerfile
View file @
4096b336
FROM
node:
carbon
FROM
node:
12.22.0-buster
# Create app directory
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
./start.sh /
RUN
npm
install
# Bundle app source
COPY
. .
EXPOSE
3000
CMD
[ "npm", "start" ]
\ No newline at end of file
ENTRYPOINT
["/start.sh"]
\ No newline at end of file
README.md
View file @
4096b336
...
...
@@ -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
)
```
shell
docker pull quay.io/ebi-ait/biovalidator:1.0.0
```
Run in server mode
```
shell
docker run
-p
3020:3020
-d
quay.io/ebi-ait/biovalidator:1.0.0
--server
```
Run in onetime mode
```
shell
docker run quay.io/ebi-ait/biovalidator:1.0.0
--schema
/path/to/schema.json
--json
/path/to/json.json
```
## License
For more details about licensing see the
[
LICENSE
](
LICENSE.md
)
.
package-lock.json
View file @
4096b336
{
"name"
:
"
json-schema-
validator"
,
"version"
:
"1.
8
.0"
,
"name"
:
"
bio
validator"
,
"version"
:
"1.
9
.0"
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
"dependencies"
:
{
...
...
package.json
View file @
4096b336
{
"name"
:
"
json-schema-
validator"
,
"version"
:
"1.
8
.0"
,
"name"
:
"
bio
validator"
,
"version"
:
"1.
9
.0"
,
"description"
:
"A nodejs JSON schema validator service."
,
"main"
:
"src/server.js"
,
"repository"
:
"https://github.com/
EMBL-EBI-SUBS/json-schema-
validator.git"
,
"repository"
:
"https://github.com/
elixir-europe/bio
validator.git"
,
"scripts"
:
{
"start"
:
"node src/server.js"
,
"test"
:
"jest"
,
...
...
start.sh
0 → 100755
View file @
4096b336
#!/bin/bash
server
=
false
while
[
$#
-gt
0
]
;
do
case
"
$1
"
in
--server
)
server
=
true
;;
--schema
)
schema
=
"
$2
"
shift
;;
--json
)
json
=
"
$2
"
shift
;;
*
)
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
esac
shift
done
if
[
$server
=
true
]
then
printf
"Running validator in server mode
\n
"
node src/server.js
else
printf
"Running validator in onetime validation mode with params schema=%s json=%s
\n
"
"
$schema
"
"
$json
"
node validator-cli.js
--schema
=
"
$schema
"
--json
=
"
$json
"
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment