Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Some updates to installation docs

Roland Geiderbdf7422a98a3
diff --git a/docs/development.rst b/docs/development.rst
index ae9f8d6b1..eb4bdb8e5 100644
--- a/docs/development.rst
+++ b/docs/development.rst
@@ -3,9 +3,6 @@
Development
===========
-You can safely install from master, it is almost always in a usable
-and stable state.
-
Virtual environment
~~~~~~~~~~~~~~~~~~~
diff --git a/docs/docker.rst b/docs/docker.rst
index 890e1afe3..9580ca4e5 100644
--- a/docs/docker.rst
+++ b/docs/docker.rst
@@ -60,3 +60,7 @@ It will mount the local path *on top* of the folder in the container. For this t
work you obviously need to manually checkout the code to ``/path/to/local/wger/``
and create a settings file as well.
+Production
+----------
+
+The production docker compose setup can be found here: https://github.com/wger-project/docker
diff --git a/docs/installation.rst b/docs/installation.rst
index 7ee3521a3..0eec32d5e 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -11,10 +11,13 @@ the following steps are performed on a Debian-based Linux distribution.
If your setup differs (e.g. in Red Hat based distros the package names are
slightly different) you will need to change the steps as appropriate.
+You can safely install from master, it is almost always in a usable and
+stable state.
+
The application is compatible and regularly tested with
-* PostgreSQL
-* python 3.6, 3.7, 3.8, 3.9 and pypy3
+* PostgreSQL, sqlite
+* python 3.8, 3.9, 3.10 and pypy3
After installation, you might also want to take a look at the :ref:`other-changes` section for other
changes you might want to do to your local instance such as Terms of Service or
@@ -33,8 +36,10 @@ These are the necessary packages for both development and production::
.. toctree::
+ :maxdepth: 1
development
- docker
production
+ docker
+ updating
diff --git a/docs/production.rst b/docs/production.rst
index c961a18e8..6fc53c1fb 100644
--- a/docs/production.rst
+++ b/docs/production.rst
@@ -115,7 +115,6 @@ Get the application::
git clone https://github.com/wger-project/wger.git /home/wger/src
cd /home/wger/src
pip install -r requirements.txt
- npm install -g yarn sass
python setup.py develop
# Only if using postgres
pip install psycopg2
@@ -131,7 +130,7 @@ Edit the settings file
* Set ``MEDIA_ROOT`` to ``/home/wger/media`` and ``STATIC_ROOT`` to ``/home/wger/static``.
* Add the domains that your site will be accessed to `ALLOWED_HOSTS=['example.com', 'www.example.com']`
- (you might want to do this as the last step when you know everything els is
+ (you might want to do this as the last step when you know everything else is
working correctly)
Run the installation script, this will download some CSS and JS libraries and
diff --git a/docs/tips_and_tricks.rst b/docs/tips_and_tricks.rst
index 96145446f..1ac87210b 100644
--- a/docs/tips_and_tricks.rst
+++ b/docs/tips_and_tricks.rst
@@ -3,40 +3,8 @@
Tips and tricks
---------------
-Updating the code
-~~~~~~~~~~~~~~~~~
-
-When pulling updates from upstream there are a couple of things to consider.
-These steps apply to all installation methods above.
-
-Upgrading the database
-``````````````````````
-
-There are regular changes and upgrades to the database schema (these may also
-come from new versions of Django or the installed dependencies). If you start
-the development server and see a message that there are unapplied migrations,
-just do ``python manage.py migrate --all``.
-
-Downloading JS and CSS libraries
-````````````````````````````````
-
-We use yarn to download the JS and CSS libraries. To update them just go to
-the source and do ::
-
- $ yarn install
-
-This happens automatically during the bootstrap process.
-
-
-Updating SASS files
-```````````````````
-After updating the SASS files, you need to compile them to regular CSS::
-
- yarn build:css:sass
-
-
Clearing the cache
-``````````````````
+~~~~~~~~~~~~~~~~~~
Sometimes there are changes to the internal changes of the cached structures.
It is recommended that you just clear all the existing caches
diff --git a/docs/updating.rst b/docs/updating.rst
new file mode 100644
index 000000000..186a99c4e
--- /dev/null
+++ b/docs/updating.rst
@@ -0,0 +1,47 @@
+.. _updating:
+
+Updating the application
+========================
+To keep the application updated you need to regularly perform the following
+steps well you pull from upstream.
+
+
+Python dependencies
+```````````````````
+To install updated python dependencies::
+
+ source /path/to/venv/bin/activate
+ python manage.py migrate
+
+
+Upgrade the database
+````````````````````````````````
+There are regular changes and upgrades to the database schema (these may also
+come from new versions of Django or the installed dependencies). If you start
+your server and see a message that there are unapplied migrations, just do::
+
+ python manage.py migrate --all
+
+You might want to save a dump of the database before applying the migrations
+in case something happens.
+
+
+JS and CSS dependencies
+````````````````````````````````
+We use yarn to download the JS and CSS libraries. To update them just run
+the following command on the source folder::
+
+ yarn install
+ yarn build:css:sass
+ python manage.py collectstatic # only needed in production
+
+Pull new data
+`````````````
+
+You can pull new exercise data and ingredients but remember that new ingredients
+can overwrite the ones you added manually::
+
+ python3 manage.py sync-exercises
+ python3 manage.py download-exercise-images
+ wger load-online-fixtures
+