-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from radicalxdev/STAGING
Update App YML for GAE Deployment
- Loading branch information
Showing
27 changed files
with
255 additions
and
149 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,12 +26,14 @@ jobs: | |
credentials_json: ${{ secrets.PRODUCTION_CREDENTIALS_JSON }} | ||
|
||
# Dynamically Update app.yaml | ||
- name: Update app.yaml | ||
- name: Update app.yaml with env variables | ||
run: | | ||
echo "" >> app/app.yaml | ||
echo "env_variables:" >> app/app.yaml | ||
echo " ENV_TYPE: '${{ env.ENV_TYPE }}'" >> app/app.yaml | ||
echo " PROJECT_ID: '${{ env.PROJECT_ID }}'" >> app/app.yaml | ||
echo "" >> app.yaml | ||
echo "env_variables:" >> app.yaml | ||
echo " ENV_TYPE: '${{ env.ENV_TYPE }}'" >> app.yaml | ||
echo " PROJECT_ID: '${{ env.PROJECT_ID }}'" >> app.yaml | ||
echo " GOOGLE_API_KEY: '${{ secrets.GOOGLE_API_KEY }}'" >> app.yaml | ||
echo " PYTHONPATH: app/" >> app.yaml | ||
- name: "Set up Cloud SDK" | ||
uses: "google-github-actions/setup-gcloud@v1" | ||
|
@@ -42,5 +44,5 @@ jobs: | |
if: github.ref == 'refs/heads/main' | ||
uses: "google-github-actions/[email protected]" | ||
with: | ||
deliverables: app/app.yaml | ||
deliverables: app.yaml | ||
version: v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
# backend/Dockerfile | ||
FROM python:3.10.12 | ||
|
||
WORKDIR /app | ||
WORKDIR /code | ||
|
||
COPY app/ /app | ||
COPY app/requirements.txt /code/requirements.txt | ||
|
||
RUN pip install --no-cache-dir -r /app/requirements.txt | ||
RUN pip install --no-cache-dir -r /code/requirements.txt | ||
|
||
COPY ./app /app | ||
COPY ./app /code/app | ||
|
||
# Local development key set | ||
# ENV TYPES: dev, production | ||
# When set to dev, API Key on endpoint requests are just 'dev' | ||
# When set to production, API Key on endpoint requests are the actual API Key | ||
|
||
ENV GOOGLE_APPLICATION_CREDENTIALS=/app/local-auth.json | ||
ENV ENV_TYPE="dev" | ||
ENV PROJECT_ID="kai-ai-f63c8" | ||
ENV PYTHONPATH=/code/app | ||
|
||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] | ||
CMD ["fastapi", "run", "app/main.py", "--port", "8000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Radical AI | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
runtime: python310 | ||
entrypoint: fastapi run app/main.py --port $PORT | ||
instance_class: F2 | ||
automatic_scaling: | ||
min_instances: 1 | ||
max_instances: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ENV_TYPE= | ||
GOOGLE_API_KEY= |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
You are a video summarizing AI who only summarizes transcript in a concise, readable, and informative format. You can analyze large amounts of text to isolate the key concepts and ideas from the transcript while ignoring tangents. Consider the following video transcript and respond with paragraphs which highlight the core ideas represented. Do not include any headers, markdown, or other page content other than plaintext of the summary. | ||
|
||
{full_transcript} |
Oops, something went wrong.