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:
3434 - name : Deploy
3535 uses :
DefangLabs/[email protected] 3636 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
3838 mode : production
3939 provider : aws
4040
4141 env :
4242 ASK_TOKEN : ${{ secrets.ASK_TOKEN }}
4343 OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
44+ REBUILD_TOKEN : ${{ secrets.REBUILD_TOKEN }}
4445 SECRET_KEY : ${{ secrets.SECRET_KEY }}
4546 SEGMENT_WRITE_KEY : ${{ secrets.SEGMENT_WRITE_KEY }}
4647 DISCORD_APP_ID : ${{ secrets.DISCORD_APP_ID }}
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ def v1_ask():
9191@csrf .exempt
9292def trigger_rebuild ():
9393 token = request .args .get ('token' )
94- if token != 'b75c82e0-2f47-4fcb-8b02-d66932803885' :
94+ if token != os . getenv ( 'REBUILD_TOKEN' ) :
9595 return jsonify ({"error" : "Unauthorized" }), 401
9696 try :
9797 print ("Running get_knowledge_base.py script..." )
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ services:
88 environment :
99 ASK_TOKEN : asktoken
1010 FLASK_APP : app.py
11+ REBUILD_TOKEN : rebuildtoken
1112 SECRET_KEY : supersecret
1213 SEGMENT_WRITE_KEY : ${SEGMENT_WRITE_KEY} # Set your Segment write key here or in the .env file
1314 SESSION_COOKIE_SECURE : 0
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ services:
1515 ASK_TOKEN :
1616 FLASK_APP : app.py
1717 DEBUG : 0
18+ REBUILD_TOKEN :
1819 SECRET_KEY :
1920 SEGMENT_WRITE_KEY :
2021 SESSION_COOKIE_SECURE : 1
You can’t perform that action at this time.
0 commit comments