@@ -6,60 +6,46 @@ https://www.bw-cloud.org/de/bwcloud_scope/nutzen
66Linux: ssh isas-interactive
77Windows: Puttygen -> Putty -> username "debian"
88
9- # Update
10- sudo apt-get dist-upgrade
119
1210# Install
1311sudo apt-get update
14- sudo apt-get install git
15- sudo apt-get install virtualenv
16-
17- sudo rm -r ./web-app
18- git clone https://github.com/KIT-ISAS/web-app.git
19- cd ./web-app
20- virtualenv .venv
21- source .venv/bin/activate
22- pip install -r requirements.txt
23-
24- # Start
25- # Python Environment (shouldn't be used on production server, but has debug messages)
26- nohup python app.py &
27-
28- # Official production solution
29- nohup gunicorn --bind 0.0.0.0:8080 --workers 32 app:server &
30- TODO use daemon
12+ sudo apt-get dist-upgrade
3113
32- # install docker
33- sudo apt update
14+ # Only once: Install Docker
3415sudo apt install -y docker.io docker-compose
3516sudo systemctl enable --now docker
3617sudo usermod -aG docker $USER
3718(then exit ssh and log back in)
3819
39- # run with docker
20+ # Only Once: Git
21+ sudo apt-get install git
22+ git clone https://github.com/KIT-ISAS/web-app.git
23+
24+ # Continue here
25+ cd ./web-app
26+ git pull
27+
28+ # Optional: Edit Dockerfile
29+ # nano dockerfile
30+ # Strg-S, Strg-X
31+
32+ # Main Command: Run with docker
4033('docker-compose' for old docker version from debian repos, 'docker compose' for newer versions like ubuntu-latest github runner)
34+ (This command starts the app. If a previous version is already running, it also shuts it down.)
4135docker-compose --profile default up -d --build
4236
43- run tests:
37+ # Run tests
4438docker compose --profile test build tests
4539docker compose --profile test run --rm tests
4640
47- turn server off (not needed for updating image):
41+ # Turn server off (not needed for updating image):
4842docker compose down
4943
50- clean up onld images:
44+ # Clean up onld images
5145docker image prune -a -f
5246
5347# Test in Browser
54- http://193.196.39.120:8080
48+ Test server: http://193.196.39.84:8080
49+ Production server: http://193.196.39.120:8080
5550
56- # Terminate old process
57- ps
58- pkill -9 python
59- pkill -f gunicorn
60- pkill -9 gunicorn
6151
62- # Update code from GitHub
63- ssh isas-interactive
64- cd ./web-app
65- git pull
0 commit comments