WishList
A simple wish list website.
Copyright (C) 2019 dasNessie
Installation
These install instructions are for uberspace 7, using gunicorn.
-
Clone this repo onto your server
-
Install the dependencies for python 3:
pip3.6 install -r requirements.txt
-
Install gunicorn for python 3:
pip3.6 install gunicorn
-
Make a subdomain folder, eg somewhere in
/var/www/virtual/<username>/<subdomain>
-
Make a folder for static files somwhere in that folder, eg
/var/www/virtual/<username>/<subdomain>/static
-
Set your web backends using the
uberspace web backend
utility. The subdomain needs to be set to a port on which gunicorn will later listen (such as8000
), the static files need to be served by apache. Example:$ uberspace web backend list <subdomain>/static apache <subdomain>/ http:8000 / apache
-
In your copy of this repo, create a file called
.env
and add the following settings:-
Set
SECRET_KEY
to an appropriate (random) value -
Set
STATIC_ROOT
to the folder for static files you just created -
Set
ALLOWED_HOSTS
to include your host -
Set
WISHLIST_URL
to the base url under which the site will run -
Set
WISHLIST_OWNER_S
to the name that should be set in the header -
Set
WISHLIST_TITLE
to the title of the list, eg 'Wishlist' -
SET
LANGUAGE_CODE
to the language your installation should have. If you don't set this, it will default to German -
The file should now look like this:
SECRET_KEY = '012lhdwi8az1#%$eygb-%9z^x3r)i-24$51mh(i$-_!^+4yq3f' STATIC_ROOT = '/var/www/virtual/dasnessie/wunschzettel.dasnessie.de/static' ALLOWED_HOSTS = 'https://wunschzettel.dasnessie.de' WISHLIST_URL = 'https://wunschzettel.dasnessie.de' WISHLIST_OWNER_S = 'Nessies' WISHLIST_TITLE = 'Wunschzettel' LANGUAGE_CODE = 'de'
-
-
Run
python3 manage.py collectstatic
in the folder that containsmanage.py
to copy your static files to the folder you set -
Run
python3 manage.py migrate
in the folder that containsmanage.py
to set up the database -
Run
python3 manage.py createsuperuser
to create a user for the admin interface. You can use that user account later to add items to the list. -
Run
python3 manage.py compilemessages
to generate the language files. -
Make a service: In
~/etc/services.d/
, make a file called something likewishlist.ini
that contains the following:[program:wishlist] command=gunicorn -b '0.0.0.0:8000' project.wsgi directory=<path to repo>/ autostart=true autorestart=true redirect_stderr=true
-
Run the service:
- Update the service list:
supervisorctl reread
- Start the deamon:
supervisorctl update
- Run the service:
supervisorctl start wishlist
- Update the service list:
-
Add items to you list: Go to the URL under which the site is running. Go to /admin from there, log in with the data from step 10 and start adding wishes
Please let me know if you encounter any problems following these instructions!
Update
For updating, do the following:
- Run
git pull
to get the latest version - Run
python3 manage.py collectstatic
in the folder that containsmanage.py
to copy your static files to the folder you set - Run
python3 manage.py migrate
in the folder that containsmanage.py
to set up the database - Run
python3 manage.py compilemessages
to update the language files - Restart the service:
supervisorctl restart wishlist
License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.