Skip to content
This repository has been archived by the owner on Mar 25, 2022. It is now read-only.

Latest commit

 

History

History
56 lines (32 loc) · 1.71 KB

LOG.md

File metadata and controls

56 lines (32 loc) · 1.71 KB

Lokal zum Laufen bringen

Anmerkung: Unter Linux muss jeweils pip3 und python3 verwendet werden, da das Projekt mit Python 3.4 läuft

  • git clone https://github.com/fzesch/lagesonum.git
  • cd lagesonum
  • sudo pip install bottle # recommended
  • sudo easy_install bottle # alternative without pip
  • sudo apt-get install python-bottle # works for debian, ubuntu, ...
  • pip install -r requirements.txt
  • python lagesonum

Vorgehensweise zum Erstellen des Projekts

1. Grundstruktur mit pyscaffold angelegt

pyscaffold -p lagesonum

2. virtualenv Umgebung angelegt (benutzt virtualenvwrapper)

mkvirtualenv lagesonum
setvirtualenvproject ~/.virtualenvs/lagesonum/ .

3. bottle installiert

pip install bottle

4. Abhängigkeiten installiert

pip freeze > requirements.txt

so daß woanders alles auf einmal installiert werden kann:

pip install -r requirements.txt

5. Hello World aus der Bottle-Dokumentation ausprobiert

funktionieren sollte:

python lagesonum    

Und im Browser http://localhost:8080/

6. Deployment auf PythonAnywhere

  1. Account auf https://www.pythonanywhere.com anlegen
  2. Web-App lagesonum mit Bottle und Python 3.4 anlegen
  3. Konsole (Bash) auf PythonAnywhere starten
  4. git clone https://github.com/fzesch/lagesonum.git

Es sind kleine Verrenkungungen wie das Verschieben von Dateien nötig, da das Verzeichnis lagesonum bereits existiert. Ich habe alles so arrangiert, daß bottle_app.py aus dem Repository an der gleichen Stelle landet wie die von PythonAnywhere angelegte Datei mit diesem Namen. Das geht sicher noch eleganter.

(Rückfragen an Kristian: krother@academis.eu)