Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/deploy-changed-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
TEST_DATABASE_PASSWORD: ${{ secrets.TEST_DATABASE_PASSWORD }}
TEST_DATABASE_URL: ${{ secrets.TEST_DATABASE_URL }}
TEST_DATABASE_USERNAME: ${{ secrets.TEST_DATABASE_USERNAME }}
TEST_DB_SSL: ${{ secrets.TEST_DB_SSL }}
TEST_DB_POSTGRESDB_PASSWORD: ${{ secrets.TEST_POSTGRES_PASSWORD }}
TEST_DB_POSTGRESDB_SSL_ENABLED: ${{ secrets.TEST_DB_POSTGRESDB_SSL_ENABLED }}
TEST_DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED: ${{ secrets.TEST_DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED }}
Expand Down
3 changes: 2 additions & 1 deletion samples/mastra-nextjs/.github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ jobs:
- name: Deploy
uses: DefangLabs/[email protected]
with:
config-env-vars: POSTGRES_PASSWORD LLM_MODEL GITHUB_TOKEN
config-env-vars: DB_SSL POSTGRES_PASSWORD LLM_MODEL GITHUB_TOKEN
env:
DB_SSL: ${{ secrets.DB_SSL }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
LLM_MODEL: ${{ secrets.LLM_MODEL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion samples/mastra-nextjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ The large language model to use for the AI-powered chat. This can be set to mode

### `DB_SSL`

Set to `true` to enable SSL. Set to `false` to disable SSL, which is used for Defang Playground. (Can be set directly in the Docker Compose file.)
_You can easily set this using `defang config set DB_SSL=<true|false>`_

Set to `true` to enable SSL for AWS and GCP. Set to `false` to disable SSL, which is used for Defang Playground.

### `GITHUB_TOKEN` (Optional)

Expand Down
6 changes: 3 additions & 3 deletions samples/mastra-nextjs/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ services:
dockerfile: Dockerfile
environment:
- DB_URL=postgres://postgres:${POSTGRES_PASSWORD}@database:5432/postgres
- DB_SSL=false # set this to false if deploying to defang playground, true otherwise
- LLM_MODEL # gemini-2.5-flash for GCP, anthropic.claude-3-5-sonnet-20241022-v2:0 for AWS
- GITHUB_TOKEN # optional, remove this line if unused
- DB_SSL # set this to true if deploying to AWS and GCP, otherwise it is false deploying to Defang Playground
- LLM_MODEL # recommended gemini-2.5-flash for GCP or anthropic.claude-3-5-sonnet-20241022-v2:0 for AWS
- GITHUB_TOKEN # remove this line if unused; optional, but recommended to avoid rate limiting when fetching from GitHub
restart: unless-stopped
ports:
- mode: ingress
Expand Down