create python venv when needed
This commit is contained in:
		
							
								
								
									
										2
									
								
								app.py
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								app.py
									
									
									
									
									
								
							| @ -8,7 +8,7 @@ vars = {} | |||||||
|  |  | ||||||
| logging.basicConfig( | logging.basicConfig( | ||||||
|     format="%(asctime)s %(message)s", |     format="%(asctime)s %(message)s", | ||||||
|     level=logging.INFO, |     level=logging.INFO | ||||||
| ) | ) | ||||||
|  |  | ||||||
| async def handshake(ws,data): | async def handshake(ws,data): | ||||||
|  | |||||||
| @ -3,7 +3,11 @@ | |||||||
| BASE=$(dirname $0) | BASE=$(dirname $0) | ||||||
| cd $BASE | cd $BASE | ||||||
| git pull | git pull | ||||||
| python3 -m venv env | if [ -d env ]; | ||||||
|  | then | ||||||
|  |     python3 -m venv env | ||||||
|  | fi | ||||||
|  |  | ||||||
| source env/bin/activate | source env/bin/activate | ||||||
| pip3 install -U -r requirements.txt | pip3 install -U -r requirements.txt | ||||||
| exec python3 app.py | exec python3 app.py | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user