chore(workflow): adding more secrets + variables for deplotment
This commit is contained in:
parent
a4d21a90fe
commit
19d6ac7f6e
4 changed files with 9 additions and 3 deletions
|
|
@ -77,6 +77,9 @@ jobs:
|
|||
- name: Write secrets in an .env file
|
||||
run: |
|
||||
echo ${{ secrets.API_PORT }} >> .env
|
||||
echo ${{ secrets.FRONTEND_PORT }} >> .env
|
||||
echo ${{ secrets.AI_API_KEY }} >> .env
|
||||
|
||||
|
||||
- name: Setup remote connection and deploy container.
|
||||
env:
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import os
|
|||
|
||||
# Load environment variables (from run.sh)
|
||||
load_dotenv()
|
||||
GEMINI_KEY = os.getenv("GEMINI_KEY")
|
||||
GEMINI_KEY = os.getenv("AI_API_KEY")
|
||||
|
||||
# gemini stuff
|
||||
client = genai.Client(api_key=GEMINI_KEY)
|
||||
|
|
|
|||
|
|
@ -3,10 +3,12 @@ services:
|
|||
command: "web"
|
||||
image: git.devdoes.work/devaine/fbla-cs-competition:app
|
||||
ports:
|
||||
- 3000:3000
|
||||
- ${FRONTEND_PORT}:3000
|
||||
|
||||
api:
|
||||
command: "api"
|
||||
image: git.devdoes.work/devaine/fbla-cs-competition:app
|
||||
environment:
|
||||
AI_API_KEY: ${AI_API_KEY}
|
||||
ports:
|
||||
- 8000:8000
|
||||
- ${API_PORT}:8000
|
||||
|
|
|
|||
|
|
@ -4,5 +4,6 @@ echo "$@"
|
|||
if [[ $1 == "web" ]]; then
|
||||
cd ./frontend/ && npm run start
|
||||
elif [[ $1 == "api" ]]; then
|
||||
export | grep "AI_API_KEY" >>./api/.env
|
||||
cd ./api/src && source ../venv/bin/activate && fastapi run
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue