From 36e98e848197474a41380bdaab15ba43d66692b7 Mon Sep 17 00:00:00 2001 From: DRogueRonin Date: Mon, 20 Mar 2023 19:13:08 +0100 Subject: [PATCH] docs: add docker development environment example (#3319) --- .../07_Development_Environment_Setup.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 docs/04_For_Developers/07_Development_Environment_Setup.md diff --git a/docs/04_For_Developers/07_Development_Environment_Setup.md b/docs/04_For_Developers/07_Development_Environment_Setup.md new file mode 100644 index 00000000..23a4b101 --- /dev/null +++ b/docs/04_For_Developers/07_Development_Environment_Setup.md @@ -0,0 +1,55 @@ +These are examples of how to setup a local development environment to add bridges, improve the docs, etc. + +## Docker + +The following can serve as an example for using docker: + +``` +# create a new directory +mkdir rss-bridge-contribution +cd rss-bridge-contribution + +# clone the project into a subfolder +git clone https://github.com/RSS-Bridge/rss-bridge +``` + +Then add a `docker-compose.yml` file: + +```yml +version: '3' + +services: + rss-bridge: + build: + context: ./rss-bridge + ports: + - 3000:80 + volumes: + - ./config:/config + - ./rss-bridge/bridges:/app/bridges +``` + +You can then access RSS-Bridge at `localhost:3000` and [add your bridge](../05_Bridge_API/How_to_create_a_new_bridge) to the `rss-bridge/bridges` folder. + +If you need to edit any other files, like from the `lib` folder add this to the `volumes` section: `./rss-bridge/lib:/app/lib`. + +### Docs with Docker + +If you want to edit the docs add this to your docker-compose.yml: + +```yml +services: + [...] + + daux: + image: daux/daux.io + ports: + - 8085:8085 + working_dir: /build + volumes: + - ./rss-bridge/docs:/build/docs + network_mode: host +``` + +and run for example the `daux serve` command with `docker-compose run --rm daux daux serve`. +After that you can access the docs at `localhost:8085` and edit the files in `rss-bridge/docs`.