Skip to content

Commit 9a55194

Browse files
committed
Merge branch 'dev'
2 parents d22a724 + 232f61d commit 9a55194

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+7435
-1802
lines changed

.env.sample

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
PROJECT_NAME="SimScore API"
2+
API_V1_STR=/v1
3+
4+
# Use different project URLs for local/dev/production:
5+
# Dev:
6+
# PROJECT_URL="https://simscore-api-dev.fly.dev"
7+
# Local:
8+
PROJECT_URL="http://127.0.0.1:3000"
9+
10+
# Security
11+
# Dev:
12+
SECRET_KEY="SomeRandomString"
13+
# Prod:
14+
# SECRET_KEY="AnotherDifferentSecretString"
15+
16+
# Rate Limiting
17+
GLOBAL_RATE_LIMIT="1000/minute"
18+
#per minute
19+
RATE_LIMIT_PER_USER="20/minute"
20+
21+
GUEST_DAILY_CREDITS=10
22+
GUEST_MAX_CREDITS=100
23+
USER_DAILY_CREDITS=100
24+
USER_MAX_CREDITS=1000
25+
26+
# OpenAI API Key:
27+
OPENAI_API_KEY=
28+
29+
# Supabase Database:
30+
# Local:
31+
DATABASE_URL="http://127.0.0.1:54321"
32+
# Anon Key, not the service role key:
33+
DATABASE_KEY=
34+
35+
# Prod:
36+
# Set as needed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Fly Deploy to Dev environment
2+
on:
3+
push:
4+
branches:
5+
- dev
6+
jobs:
7+
deploy:
8+
name: Deploy Dev app
9+
runs-on: ubuntu-latest
10+
concurrency: deploy-group # optional: ensure only one action runs at a time
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: superfly/flyctl-actions/setup-flyctl@master
14+
- run: flyctl deploy -c fly.dev.toml -a simscore-api-dev --remote-only
15+
env:
16+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_DEV }}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313
- uses: superfly/flyctl-actions/setup-flyctl@master
14-
- run: flyctl deploy --remote-only
14+
- run: flyctl deploy -c fly.prod.toml -a simscore-api --remote-only
1515
env:
16-
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
16+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_PROD }}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
__pycache__/
22
.venv/
33
.env*
4+
!.env.sample
45
*.png
56
helpers/.nltk_resources_cache
7+
**/.nltk
8+
.vscode/settings.json
9+
.python-version
10+
app/services/.nltk_resources_cache

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ WORKDIR /app
1010
COPY pyproject.toml poetry.lock ./
1111
COPY . .
1212

13-
RUN poetry install
13+
RUN poetry install --no-root
1414

1515
FROM python:3.12-slim
1616

0 commit comments

Comments
 (0)