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