Skip to content

Commit 361f66c

Browse files
authored
docs: fix database setup for local development in CONTRIBUTING.md (#287)
1 parent f703966 commit 361f66c

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ OPEN_ROUTER_API_KEY=dummy_openrouter_key
88
HELICONE_API_KEY=dummy_helicone_key
99

1010
# Database & Server
11-
DATABASE_URL=postgresql://postgres:secretpassword_local@localhost:5432/codebuff
11+
DATABASE_URL=postgresql://manicode_user_local:secretpassword_local@localhost:5432/manicode_db_local
1212
PORT=4242
1313
GOOGLE_CLOUD_PROJECT_ID=dummy_project_id
1414

@@ -37,7 +37,7 @@ DISCORD_APPLICATION_ID=dummy_discord_app_id
3737
# Frontend/Public Variables
3838
NEXT_PUBLIC_CB_ENVIRONMENT=development
3939
NEXT_PUBLIC_CODEBUFF_APP_URL=http://localhost:3000
40-
NEXT_PUBLIC_CODEBUFF_BACKEND_URL=http://localhost:3001
40+
NEXT_PUBLIC_CODEBUFF_BACKEND_URL=http://localhost:4242
4141
NEXT_PUBLIC_SUPPORT_EMAIL=support@codebuff.com
4242
NEXT_PUBLIC_POSTHOG_API_KEY=phc_dummy_posthog_key
4343
NEXT_PUBLIC_POSTHOG_HOST_URL=https://app.posthog.com

CONTRIBUTING.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Before you begin, you'll need to install a few tools:
5050
Load all environment variables at once:
5151
```bash
5252
infisical secrets set --file .env.example
53-
infisical secrets set DATABASE_URL=postgresql://postgres:secretpassword_local@localhost:5432/codebuff
53+
infisical secrets set DATABASE_URL=postgresql://manicode_user_local:secretpassword_local@localhost:5432/manicode_db_local
5454
```
5555

5656
5. **Configure environment**:
@@ -185,6 +185,12 @@ Level up the web interface in `web/` with better agent management, project templ
185185
- **direnv problems?** Make sure it's hooked into your shell, run `direnv allow`, and restart your terminal
186186
- **Script errors?** Double-check you're using bun for all commands
187187
- **Infisical issues?** See our [Infisical Setup Guide](./INFISICAL_SETUP_GUIDE.md) for step-by-step instructions
188+
- **Database connection errors?** If you see `password authentication failed for user "postgres"` errors:
189+
1. Ensure DATABASE_URL uses the correct credentials: `postgresql://manicode_user_local:secretpassword_local@localhost:5432/manicode_db_local`
190+
2. Update both your local `.env` file and Infisical secret: `infisical secrets set DATABASE_URL=postgresql://manicode_user_local:secretpassword_local@localhost:5432/manicode_db_local`
191+
3. Run the database migration: `infisical run -- bun run db:migrate`
192+
4. Restart your development services
193+
- **Empty Agent Store in dev mode?** This is expected behavior - agents from `.agents/` directory need to be published to the database to appear in the marketplace
188194

189195
**Questions?** Jump into our [Discord community](https://codebuff.com/discord) - we're friendly and always happy to help!
190196

INFISICAL_SETUP_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ infisical secrets # Verify setup works
2929
infisical secrets set --file .env.example
3030

3131
# IMPORTANT: Fix the database password separately
32-
infisical secrets set DATABASE_URL=postgresql://postgres:secretpassword_local@localhost:5432/codebuff
32+
infisical secrets set DATABASE_URL=postgresql://manicode_user_local:secretpassword_local@localhost:5432/manicode_db_local
3333
```
3434

3535
### 5. Done! Run Codebuff

0 commit comments

Comments
 (0)