2018-08-20 00:19:35 +02:00
|
|
|
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
|
|
|
|
|
2018-08-09 13:58:23 +02:00
|
|
|
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.
|
|
|
|
|
2018-08-20 00:19:35 +02:00
|
|
|
Let's organize our explanation into "iterations": you are typically developing on some aspect of it, and
|
2018-08-09 13:58:23 +02:00
|
|
|
not on the entire setup. Based on this, you'll need to do different things.
|
|
|
|
|
2018-08-20 00:19:35 +02:00
|
|
|
### Loops
|
2018-08-09 13:58:23 +02:00
|
|
|
|
2018-08-20 00:19:35 +02:00
|
|
|
#### Hacking code on tt-rss or rss-bridge
|
2018-08-09 13:58:23 +02:00
|
|
|
|
|
|
|
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!
|
|
|
|
|
2018-08-20 00:19:35 +02:00
|
|
|
#### Changing nginx configuration
|
2018-08-09 13:58:23 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
`doit` and then again run `doit`.
|
|
|
|
|
|
|
|
This workflow could be improved, being currently a bit too slow for such an easy thing.
|
|
|
|
|
2018-08-20 00:19:35 +02:00
|
|
|
#### Change some docker file
|
2018-08-09 13:58:23 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
all of our artifacts; so that running `doit` will surely rebuild everything.
|
|
|
|
|
|
|
|
Notice that building is a bit slow. There is no way to improve this, so just keep it in mind!
|