Skip to content

Commit d97a2e7

Browse files
Merge pull request #5 from Inkubator-IT/fix/drizzle-config
Fix drizzle config
2 parents e4819ca + 71291bd commit d97a2e7

File tree

4 files changed

+5
-16
lines changed

4 files changed

+5
-16
lines changed

.env.example

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@
88
# - For local development (using existing PostgreSQL on port 5432), use 'localhost' as the hostname.
99
# - For Docker Compose, use port 5433 (to avoid conflict with existing PostgreSQL) and 'db' as the hostname.
1010

11-
APP_PORT=3000
11+
APP_PORT=9000
1212
NODE_ENV=development
13-
14-
DB_PORT=5433
15-
DB_HOST=localhost
16-
POSTGRES_USER=myuser
17-
POSTGRES_PASSWORD=mypassword
18-
POSTGRES_DB=mydb
19-
20-
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOST}:${DB_PORT}/${POSTGRES_DB}
13+
DATABASE_URL=postgresql://myuser:mypassword@localhost:5433/mydb

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services:
55
env_file:
66
- .env
77
ports:
8-
- "${DB_PORT}:5432"
8+
- "5433:5432"
99
volumes:
1010
- db_data:/var/lib/postgresql/data
1111

drizzle.config.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ export default defineConfig({
55
out: "./drizzle",
66
dialect: "postgresql",
77
dbCredentials: {
8-
host: process.env.DB_HOST || "localhost",
9-
port: parseInt(process.env.DB_PORT || "5432"),
10-
user: process.env.POSTGRES_USER || "myuser",
11-
password: process.env.POSTGRES_PASSWORD || "mypassword",
12-
database: process.env.POSTGRES_DB || "mydb",
8+
url: process.env.DATABASE_URL!,
139
},
1410
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
"@types/bun": "latest",
2424
"drizzle-kit": "^0.31.7"
2525
}
26-
}
26+
}

0 commit comments

Comments
 (0)