File tree Expand file tree Collapse file tree 4 files changed +5
-2
lines changed Expand file tree Collapse file tree 4 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -34,13 +34,14 @@ jobs:
34
34
- name : Deploy
35
35
uses :
DefangLabs/[email protected]
36
36
with :
37
- config-env-vars : ASK_TOKEN OPENAI_API_KEY SECRET_KEY SEGMENT_WRITE_KEY DISCORD_APP_ID DISCORD_TOKEN DISCORD_PUBLIC_KEY
37
+ config-env-vars : ASK_TOKEN OPENAI_API_KEY REBUILD_TOKEN SECRET_KEY SEGMENT_WRITE_KEY DISCORD_APP_ID DISCORD_TOKEN DISCORD_PUBLIC_KEY
38
38
mode : production
39
39
provider : aws
40
40
41
41
env :
42
42
ASK_TOKEN : ${{ secrets.ASK_TOKEN }}
43
43
OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
44
+ REBUILD_TOKEN : ${{ secrets.REBUILD_TOKEN }}
44
45
SECRET_KEY : ${{ secrets.SECRET_KEY }}
45
46
SEGMENT_WRITE_KEY : ${{ secrets.SEGMENT_WRITE_KEY }}
46
47
DISCORD_APP_ID : ${{ secrets.DISCORD_APP_ID }}
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ def v1_ask():
91
91
@csrf .exempt
92
92
def trigger_rebuild ():
93
93
token = request .args .get ('token' )
94
- if token != 'b75c82e0-2f47-4fcb-8b02-d66932803885' :
94
+ if token != os . getenv ( 'REBUILD_TOKEN' ) :
95
95
return jsonify ({"error" : "Unauthorized" }), 401
96
96
try :
97
97
print ("Running get_knowledge_base.py script..." )
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ services:
8
8
environment :
9
9
ASK_TOKEN : asktoken
10
10
FLASK_APP : app.py
11
+ REBUILD_TOKEN : rebuildtoken
11
12
SECRET_KEY : supersecret
12
13
SEGMENT_WRITE_KEY : ${SEGMENT_WRITE_KEY} # Set your Segment write key here or in the .env file
13
14
SESSION_COOKIE_SECURE : 0
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ services:
15
15
ASK_TOKEN :
16
16
FLASK_APP : app.py
17
17
DEBUG : 0
18
+ REBUILD_TOKEN :
18
19
SECRET_KEY :
19
20
SEGMENT_WRITE_KEY :
20
21
SESSION_COOKIE_SECURE : 1
You can’t perform that action at this time.
0 commit comments