From 65f39a4595f87fd8fc62a372a2b3da474b1202b6 Mon Sep 17 00:00:00 2001 From: boyska Date: Mon, 20 Aug 2018 00:19:35 +0200 Subject: [PATCH] more doc on how to setup --- README.md | 16 ++++++++++++++-- doc/HACKING.md | 25 ++++++++++++++++++++----- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1f816da..d915e73 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ FEEDATI La nuova frontiera dello smanettamento con gli RSS -## Installami +## Install Serve installare le seguenti cosucce: @@ -12,7 +12,19 @@ Serve installare le seguenti cosucce: - `go get 'github.com/betalo-sweden/await'` (serve Go >= 1.8) - [doit](http://pydoit.org/) (`pip3 install doit==0.31` or `apt-get install python3-doit`) -## Lanciare +## Some more setup + +You need to resolve localhost as `feedati-fe`. Run: + + echo 127.0.0.1 feedati-fe | sudo tee -a /etc/hosts + +## Run Running `doit` is enough. It will build images, configure them, then run everything. + +## Use + +Point your browser to `http://feedati-fe/tt-rss/`. + +NO, `http://localhost/` won't work. diff --git a/doc/HACKING.md b/doc/HACKING.md index 36ec278..5fad2d6 100644 --- a/doc/HACKING.md +++ b/doc/HACKING.md @@ -1,22 +1,37 @@ +Don't even read this if you haven't got README.md right + +## Things to setup + +If you want to make some contribution to the project, please take some minute setting things up. + +Editing file that are bind-mounted over a container is not totally trivial; if you use vim, please +`set modeline backupcopy` in your vimrc. This will make your editing a bit more pleasant and avoid [known +issues](https://github.com/moby/moby/issues/15793). If you don't use vim, check that your editor doesn't +change inode to editing file, or editing files live from host to container will give you headache. + +Please also see [GIT.md](GIT.md) for tips on setting git. + +## Coding, running, coding + The instructions in README.md are fine when you only want to run. However, when developing, you might need to know some more tricks. The goal of our build manager (`dodo.py`) is to make a single call to `doit`, without arguments, always a sane and correct choice. However that could not always be the case. -Let's organize our explanation into "iteration loops": you are typically developing on some aspect of it, and +Let's organize our explanation into "iterations": you are typically developing on some aspect of it, and not on the entire setup. Based on this, you'll need to do different things. -## Loops +### Loops -### Hacking code on tt-rss or rss-bridge +#### Hacking code on tt-rss or rss-bridge If you are changing PHP code, well, this is the easiest part. Run `doit`, and you should have everything running, and logs showing up. Then, with your favourite editor, edit the PHP files you prefer. You can then refresh what you want in the browser, and everything should be automatically changing. No other action required! -### Changing nginx configuration +#### Changing nginx configuration Currently, there is no way to reload nginx, even though it should not be impossible, theoretically, to do it. So edit `docker/nginx.conf` with your favourite editor then run `doit`. On the next change, give `ctrl-c` to @@ -24,7 +39,7 @@ So edit `docker/nginx.conf` with your favourite editor then run `doit`. On the n This workflow could be improved, being currently a bit too slow for such an easy thing. -### Change some docker file +#### Change some docker file When you change the dockerfile you need to build everything again. Doit should notice this, and just running `doit` should build everything again. If for some reason this is not the case, `doit clean build` will clean