Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dockerization #384

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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"]