You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Composter uses Prisma ORM with PostgreSQL and Better Auth for authentication tables. **Important:** follow the migration order below to avoid schema conflicts.
96
96
97
-
1. Set up your database (local Postgres or hosted DB like Neon).
98
-
2. Update `apps/api/.env` with `DATABASE_URL`.
99
-
3. Run Prisma migrations from `apps/api`:
97
+
#### Step 1: Start the database with Docker Compose
98
+
99
+
From the repository root, run:
100
+
101
+
```bash
102
+
docker compose up -d
103
+
```
104
+
105
+
This starts:
106
+
-**PostgreSQL** on port `5432` (configurable via `DB_PORT` env var)
107
+
-**Adminer** (database UI) on [http://localhost:8080](http://localhost:8080)
108
+
109
+
**Default credentials:**
110
+
| Variable | Default Value |
111
+
|----------|---------------|
112
+
|`DB_USER`|`composter`|
113
+
|`DB_PASSWORD`|`composter`|
114
+
|`DB_NAME`|`composter_db`|
115
+
|`DB_PORT`|`5432`|
116
+
117
+
To customize, set environment variables before running `docker compose up`:
118
+
119
+
```bash
120
+
DB_PORT=5433 DB_PASSWORD=mysecret docker compose up -d
121
+
```
122
+
123
+
#### Step 2: Configure DATABASE_URL
124
+
125
+
Update `apps/api/.env` with the connection string matching your Docker setup:
0 commit comments