Minimal infrastructure needed to bring up an instance of
quicktill.tillweb as a uwsgi service.
Ensure you have poetry installed. Installation instructions are on this page.
You should have a copy of quicktill unpacked in the directory above
the one containing this file. If you don't, you can get one as
follows:
git clone https://github.com/sde1000/quicktill.git ../quicktill
Install the project dependencies:
poetry install
To configure, create the following files in the config directory:
-
a random secret in the file
secret_key: trypython3 -c "import secrets; print(secrets.token_urlsafe())" >config/secret_key -
the name of the till database in the file
database_name -
the name of the site served by the till in the file
till_name -
the currency symbol used by the till in the file
currency_symbol
Create the Django database and an initial admin user:
poetry run ./manage.py migrate
poetry run ./manage.py createsuperuser
To start a web server on http://localhost:8000/ to test the service:
poetry run ./manage.py runserver
As root:
- copy
tillweb-nginx-configurationto/etc/nginx/sites-available/tillweband edit it as appropriate. - delete
/etc/nginx/sites-enabled/defaultand symlink/etc/nginx/sites-available/tillwebto/etc/nginx/sites-enabled/tillweb - run
loginctl enable-linger your-usernameto enable the service to run while you are not logged in
As the user that will run the service:
Copy systemd/tillweb.service to ~/.config/systemd/user/ and enable it:
mkdir -p ~/.config/systemd/user
cp systemd/tillweb.service ~/.config/systemd/user/
systemctl --user enable tillweb.service
systemctl --user start tillweb.service
Outside of the scope of these instructions: set up DNS entries and letsencrypt so you can access the service over https.