Conversation
Updated tutorial instructions.
Codecov Report
@@ Coverage Diff @@
## master #259 +/- ##
=======================================
Coverage 71.38% 71.38%
=======================================
Files 44 44
Lines 2558 2558
=======================================
Hits 1826 1826
Misses 732 732 Continue to review full report at Codecov.
|
| # create trim alias | ||
| alias trim="awk '{\$1=\$1};1'" | ||
| # remove the top 11 lines + trim spaces at beginning of lines | ||
| trim src/bepasty/config.py | tail -n +11 > /home/bepasty/bepasty.conf |
There was a problem hiding this comment.
please do not invent such tools for an install tutorial. just describe what needs to be done.
There was a problem hiding this comment.
Maybe we can agree to put the recipe in the Tips & Tricks instead?
| SOCKFILE=$HOME/gunicorn.sock # we will communicate using this unix socket | ||
| PIDFILE=$HOME/gunicorn.pid | ||
| NUM_WORKERS=3 # how many worker processes should Gunicorn spawn | ||
| export PATH="/home/bepasty/.local/bin:$PATH" #include gunicorn path for exec |
There was a problem hiding this comment.
always have 2 spaces (at least) before and 1 space after #.
| server_name paste.example.org; # <-- add your domainname here | ||
| server_name bepasty.example.org; # <-- add your domainname here |
There was a problem hiding this comment.
thanks for wanting to mention bepasty, but paste or pastebin is the more well-known name for that kind of service.
There was a problem hiding this comment.
I think this needs to be consistent throughout the tutorial. In the tutorial section that modifies /home/bepasty/bepasty.conf
SITENAME = 'bepasty.example.org'
Therefore, in my humble opinion - whatever is used pasty.example.org or bepasty.example.org has to be consistent so that those that are new to bepasty are not confused.
| tail /home/bepasty/logs/nginx-access.log | ||
| tail /home/bepasty/logs/nginx-error.log | ||
| tail /home/bepasty/logs/gunicorn_supervisor.log |
There was a problem hiding this comment.
never use tail to output logs to your console, that is dangerous. better: less +F filename
There was a problem hiding this comment.
OK - point taken. Thanks for pointing this out.
| * The user secret in ``bepasty/config.py`` needs to be secure - an easy way | ||
| to create secure random character strings on the command line is: | ||
| ``tr -dc A-Za-z0-9 </dev/urandom | head -c 10 ; echo ''`` | ||
| this can also be used to create a long random secure SECRET_KEY value: | ||
| ``tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' </dev/urandom | head -c 255 ; echo ''`` |
There was a problem hiding this comment.
Maybe use same command for both and just tell to use a longer secret for the SECRET_KEY.
There was a problem hiding this comment.
The difference is that the first example only uses characters that can be typed on any language keyboard. The second uses almost the full list of the suggested characters for strong keys - of which may be difficult to enter on different keyboards.
I'm not against the idea and can modify as per your suggestion.
| apt-get install build-essential nginx supervisor python-dev git-core python-pip python-virtualenv | ||
| apt-get install nginx git-core python3-dev python3-pip virtualenv python3-virtualenv |
There was a problem hiding this comment.
so, you did not need build-essential? is it installed on your base system already?
what's up with the supervisor stuff?
There was a problem hiding this comment.
Good spot regarding the missing supervisor.
On Debian 10 - no need for build-essential as anything that is required by the python/pip/etc.. packages are pulled in anyway.
I have now installed twice more to verify and I have confirmed that all you need is:
apt-get install git-core python3-dev python3-pip virtualenv python3-virtualenv nginx supervisor
|
@oijn did you see my feedback? |
|
BTW, I'll make a 1.0 release soon, maybe we can get this PR merged before that. |
Sorry - I was meaning to get back to this - have now just done so. I have also re-run the tutorial two extra times and have changed the order of some points and modified some. I have tried to make another pull request with the changes. Not sure if it worked? [update] seems I've managed to create two pull requests. The latest one is the correct one. |
|
superseded by #264 |
Updated tutorial instructions for latest Debian+Python3.