diff --git a/README.md b/README.md index 445f2527..70670237 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ If you want to run your instance of RAWGraphs locally on your machine, be sure y If you want to run your instance of RAWGraphs locally on your machine, be sure you have the following requirements installed. - [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) (it could be used through the interface of [GitHub Desktop](https://desktop.github.com/)) -- [Node.js](https://nodejs.org/en/) +- [Node.js](https://nodejs.org/en/) (version 14) - [Yarn](https://yarnpkg.com/getting-started/install) ### Instructions (macOS) @@ -63,6 +63,16 @@ You can also build your own version and upload it on your server by running the yarn build ``` +### Instructions (docker on any platform) + +You might have a newer version of node installed. If so, you could benefit from running the `RAWGraphs-app` in an isolated container. To do this you will need to have docker installed. Then open the terminal in the root folder of the repository and type: + +```shell +docker-compose up +``` + +This will install and start yarn. To access the app, open http://localhost:3000 as you would do otherwise. If you want to build your own production version, you would need to modify your docker configuration accordingly. + ## Contributing Want to contribute to RAWGraphs's development? You are more than welcome! Start by forking the repository (the "Fork" button at the top-right corner of this page) and follow the instructions above to clone it and install dependencies. Then you can use Github's issues and pull requests to discuss and share your work. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..7b05cdfb --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3.9' + +services: + rawgraphs: + container_name: rawgraphs + image: node:14-alpine + expose: + - 3000 + volumes: + - .:/app + stdin_open: true + ports: + - 3000:3000 + working_dir: /app + entrypoint: ["/bin/sh", "-c" ,"yarn install && yarn start --host 0.0.0.0"] +