Skip to content

Commit

Permalink
fix: change port for postgres (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
indrif authored Sep 15, 2023
1 parent 8d643dd commit 4db1f10
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion backend/.env.defaults
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DATABASE_URL=postgresql://diamonds:password@localhost:5432/diamonds
DATABASE_URL=postgresql://diamonds:password@localhost:5433/diamonds
2 changes: 1 addition & 1 deletion backend/ormconfig.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const dbConfig = {
type: "postgres",
port: 5432,
port: 5433,
host: process.env["TYPEORM_HOST"] || "localhost",
username: process.env["TYPEORM_USERNAME"] || "postgres",
password: process.env["TYPEORM_PASSWORD"] || "postgres",
Expand Down
8 changes: 6 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ services:
- ./backend/src:/app/src
- ./backend/prisma:/app/prisma
# - /app/node_modules
depends_on:
- database
environment:
ENVIRONMENT: development
DATABASE_URL: postgresql://diamonds:password@database:5432/diamonds?schema=public
DATABASE_URL: postgresql://diamonds:password@database:5433/diamonds?schema=public
ports:
- 8081:3000
logging:
Expand Down Expand Up @@ -52,10 +54,12 @@ services:
POSTGRES_DB: diamonds
POSTGRES_USER: diamonds
POSTGRES_PASSWORD: password
command:
- "-p 5433"
volumes:
- db-data:/var/lib/postgresql/data
ports:
- 5432:5432
- 5433:5433

volumes:
db-data:
Expand Down

0 comments on commit 4db1f10

Please sign in to comment.