Skip to content

Commit

Permalink
Merge seed scripts (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
fomalhautb authored Dec 3, 2024
1 parent 7431a3c commit d5d28b2
Show file tree
Hide file tree
Showing 10 changed files with 274 additions and 327 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:
with:
images: ${{ secrets.DOCKER_REPO }}/server
tags: |
type=ref,event=branch
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=ref,event=branch,enable=${{ github.ref != 'refs/heads/main' }}
type=sha,prefix=
type=match,pattern=\d.\d.\d
Expand Down Expand Up @@ -56,5 +57,5 @@ jobs:
context: .
file: ./docker/server/Dockerfile
push: ${{ steps.push-condition.outputs.should_push }}
tags: ${{ steps.meta.outputs.tags == 'main' && 'latest' || steps.meta.outputs.tags }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
11 changes: 11 additions & 0 deletions apps/backend/.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ NEXT_PUBLIC_STACK_API_URL=# the base URL of Stack's backend/API. For local devel
NEXT_PUBLIC_STACK_DASHBOARD_URL=# the URL of Stack's dashboard. For local development, this is `http://localhost:8101`; for the managed service, this is `https://app.stack-auth.com`.
STACK_SERVER_SECRET=# a random, unguessable secret key generated by `pnpm generate-keys`

# seed script settings
STACK_SEED_SIGN_UP_ENABLED=# true to add OTP auth to the dashboard when seeding
STACK_SEED_OTP_ENABLED=# true to add OTP auth to the dashboard when seeding
STACK_SEED_ALLOW_LOCALHOST=# true to allow running dashboard on the localhost, set this to true only in development
STACK_SEED_OAUTH_PROVIDERS=# list of oauth providers to add to the dashboard when seeding, separated by comma, for example "github,google,facebook"
STACK_SEED_CLIENT_TEAM_CREATION=# true to allow the users of the internal project to create teams
STACK_SEED_USER_EMAIL=# default user added to the dashboard
STACK_SEED_USER_PASSWORD=# default user's password, paired with STACK_SEED_USER_EMAIL
STACK_SEED_USER_INTERNAL_ACCESS=# if the default user has access to the internal dashboard project
STACK_SEED_USER_GITHUB_ID=# add github oauth id to the default user

# OAuth mock provider settings
STACK_OAUTH_MOCK_URL=# enter the URL of the mock OAuth provider here. For local development, use `http://localhost:8114`.

Expand Down
12 changes: 12 additions & 0 deletions apps/backend/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@ NEXT_PUBLIC_STACK_API_URL=http://localhost:8102
NEXT_PUBLIC_STACK_DASHBOARD_URL=http://localhost:8101
STACK_SERVER_SECRET=23-wuNpik0gIW4mruTz25rbIvhuuvZFrLOLtL7J4tyo

STACK_SEED_SIGN_UP_ENABLED=true
STACK_SEED_OTP_ENABLED=true
STACK_SEED_ALLOW_LOCALHOST=true
STACK_SEED_OAUTH_PROVIDERS=github,spotify,google,microsoft
STACK_SEED_CLIENT_TEAM_CREATION=true
STACK_SEED_USER_INTERNAL_ACCESS=true

NEXT_PUBLIC_STACK_PROJECT_ID=project-id-from-stack-dashboard
NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY=this-publishable-client-key-is-for-local-development-only
STACK_SECRET_SERVER_KEY=this-secret-server-key-is-for-local-development-only
STACK_SUPER_SECRET_ADMIN_KEY=this-super-secret-admin-key-is-for-local-development-only

STACK_OAUTH_MOCK_URL=http://localhost:8114

STACK_GITHUB_CLIENT_ID=MOCK
Expand Down
202 changes: 0 additions & 202 deletions apps/backend/prisma/seed-self-host.ts

This file was deleted.

Loading

0 comments on commit d5d28b2

Please sign in to comment.