From d56ed83d0026a14e1446a91ff74adf77baf26038 Mon Sep 17 00:00:00 2001 From: Thanasis Vergoulis Date: Thu, 13 Oct 2022 11:03:36 +0200 Subject: [PATCH 1/2] removed exact numbers and other minor fixes updated to remove detailed information about the number of records or sources (which is subject to changes) --- docs/intro.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/intro.md b/docs/intro.md index 1b27129..95b1b40 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -9,9 +9,9 @@ sidebar_position: 1 The OpenAIRE Research Graph is one of the largest open scholarly record collections worldwide, key in fostering Open Science and establishing its practices in the daily research activities. Conceived as a public and transparent good, populated out of data sources trusted by scientists, the Graph aims at bringing discovery, monitoring, and assessment of science back in the hands of the scientific community. -Imagine a vast collection of research products all linked together, contextualised and openly available. For the past ten years OpenAIRE has been working to gather this valuable record. It is a massive collection of metadata and links between scientific products such as articles, datasets, software, and other research products, entities like organisations, funders, funding streams, projects, communities, and data sources. +Imagine a vast collection of research products all linked together, contextualised and openly available. For the past years OpenAIRE has been working to gather this valuable record. It is a massive collection of metadata and links between scientific products such as articles, datasets, software, and other research products, entities like organisations, funders, funding streams, projects, communities, and data sources. -As of today, the OpenAIRE Research Graph aggregates around 450Mi metadata records with links collecting from 10K data sources trusted by scientists, including: +As of today, the OpenAIRE Research Graph aggregates hundreds of millions of metadata records (and links among them) from multiple data sources trusted by scientists, including: * Repositories registered in OpenDOAR or re3data.org (soon FAIRSharing.org) * Open Access journals registered in DOAJ @@ -22,4 +22,4 @@ As of today, the OpenAIRE Research Graph aggregates around 450Mi metadata record * Datacite After cleaning, deduplication, enrichment and full-text mining processes, the graph is analysed to produce statistics for the [OpenAIRE MONITOR](https://monitor.openaire.eu), the [Open Science Observatory](https://osobservatory.openaire.eu), made discoverable via the [OpenAIRE EXPLORE](https://explore.openaire.eu) and programmatically accessible via [OpenAIRE Public APIs](https://develop.openaire.eu). -Last but not least, frequently updated [JSON dumps](download) are published on Zenodo. +Last but not least, the Graph data are openly available and can be used by third-parties to create added value services. From 58c89d71da02c6acf6f362a8dad208aac981eda1 Mon Sep 17 00:00:00 2001 From: User Date: Thu, 13 Oct 2022 20:52:52 +0300 Subject: [PATCH 2/2] Add deployment with docker --- Dockerfile | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 17 ++++++++++++++++- 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2ac9208 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,52 @@ +## Base ######################################################################## + +# Use a larger node image to do the build for native deps (e.g., gcc, python) +FROM node:lts as base + +# Reduce npm log spam and colour during install within Docker +ENV NPM_CONFIG_LOGLEVEL=error +ENV NPM_CONFIG_COLOR=false + +# We'll run the app as the `node` user, so put it in their home directory +WORKDIR /home/node/app + +RUN chown -R node:node /home/node + +# Copy the source code over +COPY --chown=node:node . /home/node/app/ + +## Development ################################################################# + +# Define a development target that installs devDeps and runs in dev mode +FROM base as development +WORKDIR /home/node/app + +# Install (not ci) with dependencies, and for Linux vs. Linux Musl (which we use for -alpine) +RUN npm install + +# Switch to the node user vs. root +USER node + +# Expose port 3000 +EXPOSE 3000 + +# Start the app in debug mode so we can attach the debugger +CMD ["npm", "start"] + +## Production ################################################################## +# Also define a production target which doesn't use devDeps +FROM base as production +WORKDIR /home/node/app +COPY --chown=node:node --from=development /home/node/app/node_modules /home/node/app/node_modules + +# Build the Docusaurus app +RUN npm run build + +## Deploy ###################################################################### + +# Use a stable nginx image +FROM nginx:stable-alpine as deploy +WORKDIR /home/node/app + +# Copy what we've installed/built from production +COPY --from=production /home/node/app/build /usr/share/nginx/html/ diff --git a/README.md b/README.md index 6847a4a..171382e 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,22 @@ $ npm run build ``` ## Deployment using Docker -TODO + +### Development + +Build docker container for development and run on port 3000: +``` +docker build --target development -t docs:dev . +sudo docker run -d -p 3000:3000 docs:dev +``` + +### Production + +Build docker container for production and run on port 80: +``` +docker build -t docs:latest . +docker run -d -p 80:80 docs:latest +``` ## Documentation versioning The versioning documentation of Docusaurus can be found [here](https://docusaurus.io/docs/versioning).