||4 months ago|
|general||11 months ago|
|maintenance||11 months ago|
|specific||11 months ago|
|uberspace||11 months ago|
|README.md||11 months ago|
|config_example.ini||11 months ago|
|deploy.py||4 months ago|
|deployment_requirements.txt||11 months ago|
This directory contains a script and files to deploy moodpoll at an uberspace account.
We use deploymentutils (which is built on top of fabric (>=2.5). This decision seems to be a good compromise between raw bash scripts and a complex configuration management system like ansible – at least for python affine folks. Complete deployment should (at best) be a onliner.
How to deploy
- Ensure you have this directory structure:
[project_root] ├── [project_repo]/ │ ├── .git/... │ ├── deployment/ │ │ ├── README.md <- you read this file │ │ ├── deploy.py │ │ ├── general/... <- general deployment files │ │ ├── uberspace/... <- uberspace-specific deployment files │ │ ├── config_example.py │ │ └── ... │ ├── manage.py │ ├── config.ini <- this has to be created manually (not included in the repo) │ └── ... │ └── ...
python3 manage.py migrate.
python3 manage.py runserver.
- Note: If you want to deploy inside a virtual environment you have to manage that yourself.
How to deploy
moodpoll on a remote server (uberspace):
Note: We describe deployment on uberspace because from what we know it provides the lowest hurdle to test (and run) moodpoll. Probably there are other equivalent or even better hosters out there. The script
deploy.py is mainly an automated and adapted version of this setup guide: https://lab.uberspace.de/guide_django.html.
- Create an uberspace-account (first month is free), then pay what you like.
- Set up your ssh key in the webfrontend
- Locally run
pip install deployment_requirements.txt(inside
eval $(ssh-agent); ssh-add -t 5mto unlock you private ssh-key in this terminal (The deplyment script itself does not ask for your ssh-key password).
python3 deploy.py --initial remotefor full deployment.
python3 deploy.py --helpto get an overview of available options for partial deployment.