File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ cd ~ /fastapi-oauth2/
3
+ git restore .
4
+ git pull
5
+
6
+ cd ~ /fastapi-oauth2/examples/demonstration
7
+ echo " import main; from fastapi import FastAPI; app = FastAPI(); app.mount('/fastapi-oauth2', main.app)" > playground.py
8
+
9
+ sudo rm -r /var/www/playground/fastapi-oauth2/
10
+ sudo cp -r ~ /fastapi-oauth2/examples/demonstration /var/www/playground/fastapi-oauth2/
11
+ sudo python3 -m pip install -r /var/www/playground/fastapi-oauth2/requirements.txt
12
+
13
+ # Update environment variables for production
14
+ ENV_FILE=/var/www/playground/fastapi-oauth2/.env
15
+ for ENV_KEY in OAUTH2_GITHUB_CLIENT_ID OAUTH2_GITHUB_CLIENT_SECRET OAUTH2_GOOGLE_CLIENT_ID OAUTH2_GOOGLE_CLIENT_SECRET;
16
+ do
17
+ sudo python3 -c " from dotenv import set_key; set_key('${ENV_FILE} ', '${ENV_KEY} ', '${! ENV_KEY} ')" ;
18
+ done
19
+
20
+ sudo service playground.fastapi-oauth2 restart
You can’t perform that action at this time.
0 commit comments