-
-
Notifications
You must be signed in to change notification settings - Fork 13
Install & Run instructions
screen
pip install pervane
pervane --dir=example/
When you go to localhost:5000, you need to register.
Pervane only accepts 1 user. So your notes will only be visible by this single user.
Package details here: https://pypi.org/project/pervane/
The following command starts pervane in a container on port=5000
with the
host network. You can see it at localhost:5000
on your browser.
docker run --network host pervane/pervane
- Clone the repo to somewhere in your machine.
- Run it in screen or tmux.
# Run it in screen to make it always run.
screen
# Download the latest version.
git clone https://github.com/hakanu/pervane.git
cd pervane/pervane
python3 serve.py --dir=example/
The tool is still under heavy development, I update the package in pypi multiple times per week. It would be great if you keep updating pervane.
pip install --upgrade pervane
The latest
pervane/pervane
image on Docker Hub contains the most recent
pervane version which existed at the build time of the image. If a new pervane
version is published after you pull the latest
image, when you run a
container, the container will internally update pervane before starting it.
However, when you stop the container and run another one, it will repeat the
update step. A warning is printed to remind you to pull the new latest
image
from Docker Hub again so that you can use the image that contains the new
pervane version.
-
--dir
: Note root directory. File tree will be generated from this. IfPERVANE_HOME
environment variable is set and--dir
is not provided,PERVANE_HOME
is used. -
--host
: defaults to 0.0.0.0. Hostname to be binded. IfPERVANE_HOST
environment variable is set and--host
is not provided,PERVANE_HOST
is used. -
--port
: defaults to 5000. Port number to be binded. IfPERVANE_PORT
environment variable is set and--port
is not provided,PERVANE_PORT
is used. -
--config_dir
. defaults to$HOME/.pervane
. Directory to keep internal files of pervane. IfPERVANE_CONFIG_HOME
environment variable is set and--config_dir
is not provided,PERVANE_CONFIG_HOME
is used. -
--username
: DEPRECATED. Authentication is now based on cookie based login. Username for basic http auth. defaults to 'hakuna'. -
--password
: DEPRECATED. Authentication is now based on cookie based login. Username for basic http auth. defaults to 'matata'. -
--front_page_message
: / message. -
--cache_seconds
: Seconds to bust the cache. Mainly used for file tree re-reading. -
--debug
: Enable more verbose logging. IfPERVANE_DEBUG
environment variable is set and--debug
is not provided,PERVANE_DEBUG
is used. -
--version
: Show version.
The following command mounts /home/basri/notes
and /home/basri/.pervane
to
the container. You can run pervane with the user and note data on your host.
Make sure to change the host directories to your own setup.
docker run \
--rm --network host \
--mount type=bind,source=/home/basri/notes,target=/pervane-notes \
--mount type=bind,source=/home/basri/.pervane,target=/pervane-config \
pervane/pervane --dir=/pervane-notes --config_dir=/pervane-config
You can do the same with environment variables as follows:
docker run \
--rm --network host \
-e PERVANE_HOME=/pervane-notes -e PERVANE_CONFIG_HOME=/pervane-config \
--mount type=bind,source=/home/basri/notes,target=/pervane-notes \
--mount type=bind,source=/home/basri/.pervane,target=/pervane-config \
pervane/pervane
PERVANE_HOME
and PERVANE_CONFIG_HOME
point to /var/opt/pervane
and
/etc/opt/pervane
by default. You can mount your host directories to their
default values as below:
docker run \
--rm --network host \
--mount type=bind,source=/home/basri/notes,target=/var/opt/pervane \
--mount type=bind,source=/home/basri/.pervane,target=/etc/opt/pervane \
pervane/pervane