Skip to content

Commit 1d17878

Browse files
committed
feat: add Coastfile for local development
Add a Coastfile so developers can use Coasts to run isolated dev environments with the full stack (Next.js, backend worker, zoekt, Postgres, Redis) in parallel for worktree-based workflows. AUTH_URL is set via the Coastfile command using the WEB_DYNAMIC_PORT env var that Coast injects at runtime. No changes to .env.development needed. Fixes #1056
1 parent ab50384 commit 1d17878

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.env.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ CTAGS_COMMAND=ctags
1212
# openssl rand -base64 33
1313
# @see: https://authjs.dev/getting-started/deployment#auth_secret
1414
AUTH_SECRET="00000000000000000000000000000000000000000000"
15-
AUTH_URL="http://localhost:${WEB_DYNAMIC_PORT:-3000}"
15+
AUTH_URL="http://localhost:3000"
1616
# AUTH_CREDENTIALS_LOGIN_ENABLED=true
1717

1818
DATA_CACHE_DIR=${PWD}/.sourcebot # Path to the sourcebot cache dir (ex. ~/sourcebot/.sourcebot)

Coastfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ cache = ["bin"]
2323
# Next.js frontend + API
2424
[services.web]
2525
install = ["cd /workspace && (test -f node_modules/.yarn-state.yml || DATABASE_URL=postgresql://postgres:postgres@host.docker.internal:5432/postgres make yarn)", "cd /workspace && test -f config.json || echo {} > config.json", "cd /workspace && DATABASE_URL=postgresql://postgres:postgres@host.docker.internal:5432/postgres yarn dev:prisma:migrate:dev"]
26-
command = "cd /workspace && DATABASE_URL=postgresql://postgres:postgres@host.docker.internal:5432/postgres REDIS_URL=redis://host.docker.internal:6379 yarn dev:web"
26+
command = "cd /workspace && AUTH_URL=http://localhost:${WEB_DYNAMIC_PORT:-3000} DATABASE_URL=postgresql://postgres:postgres@host.docker.internal:5432/postgres REDIS_URL=redis://host.docker.internal:6379 yarn dev:web"
2727
port = 3000
2828
restart = "on-failure"
2929
cache = ["node_modules"]

0 commit comments

Comments
 (0)