Skip to content

Update install-tutorial.rst - #264

Open
oijn wants to merge 1 commit into
bepasty:masterfrom
oijn:patch-3
Open

oijn wants to merge 1 commit into
bepasty:masterfrom
oijn:patch-3

Conversation

@oijn

@oijn oijn commented Jan 10, 2021

Copy link
Copy Markdown

I have updated the tutorial and verified by installing from a new Debian 10 minimal server install twice.

I have also (tried) to create a new pull request and answered the comments.

I have updated the tutorial and verified by installing from a new Debian 10 minimal server install twice.

I have also (tried) to create a new pull request and answered the comments.
Comment thread docs/source/install-tutorial.rst
sudo su - bepasty
su - bepasty
# add path to bepasty/.bashrc
echo "export PATH=\"/home/bepasty/.local/bin:\$PATH\"" >> /home/bepasty/.bashrc

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use ~/.bashrc here also, see below.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above was added to suppress errors from when installing flask & pygmentize during the pip3 install.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what I meant is that in line 35, you use ~/.bashrc but in line 33 you use >> /home/bepasty/.bashrc to refer to the same file.

i suggest to use >> ~/.bashrc in line 33 also.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still wondering though: what exactly ends up being in .local/bin when following these instructions?

shouldn't all stuff end up in ./bin of the virtual env we created and activated?

Comment thread docs/source/install-tutorial.rst
On the command line as the bepasty user:
# create trim alias
``alias trim="awk '{\$1=\$1};1'"``
# remove the top 11 lines + trim spaces at beginning of lines

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks like something that is going to break if we ever change the header of that file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so, just remove that, please.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. Do you have any suggestions on an alternative approach to automating this given the amount of manual effort needed to get the config file into a suitable format and the consequences and errors if not?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the install tutorial is for a manual installation, so it does not need to do everything automated.

Comment on lines +175 to +177
* 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 ''``

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the user secret is something a user either interactively / manually enters at the web UI - in that case they will use something that they can remember more easily.

or, they use a password manager, in that case they won't need that script because they'll use the pwmgr to generated the pw.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no problems either way.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, so just remove these lines.

Comment on lines +178 to +180
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 ''``
The length of the random character string is set by the head -c $LENGTH.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, or you can just type a long enough more or less random string, which will be fine also.

you'll never need to enter it, so that's pretty easy without a complicated looking script piece like that.

so, can we just get rid of these pw generating tipps and tricks?

i'ld rather like to keep the docs shorter and simpler than make a shell scripting tips and tricks out of them.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no problems either way.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here.

@ThomasWaldmann

Copy link
Copy Markdown
Contributor

@oijn did you see my feedback?

Comment on lines +26 to +31
Commands to run as user bepasty:

::

# change to user bepasty
sudo su - bepasty
su - bepasty

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strictly taken, line 26 needs to be moved to below current line 31.

@ThomasWaldmann

Copy link
Copy Markdown
Contributor

besides my feedback, one could also add that pip install -e[pillow] might be desired if one wants to show thumbnails.

see that PR: #271

@ThomasWaldmann

Copy link
Copy Markdown
Contributor

@oijn do you want to finish this PR? see my feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants