From 4db1f109ccc0520cb0970a1a75f83f573d9315d4 Mon Sep 17 00:00:00 2001 From: Daniel Winther Date: Fri, 15 Sep 2023 10:43:44 +0200 Subject: [PATCH] fix: change port for postgres (#308) --- backend/.env.defaults | 2 +- backend/ormconfig.js | 2 +- docker-compose.yml | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/backend/.env.defaults b/backend/.env.defaults index 3e2ebbce..48fc3467 100644 --- a/backend/.env.defaults +++ b/backend/.env.defaults @@ -1 +1 @@ -DATABASE_URL=postgresql://diamonds:password@localhost:5432/diamonds +DATABASE_URL=postgresql://diamonds:password@localhost:5433/diamonds diff --git a/backend/ormconfig.js b/backend/ormconfig.js index 94bdc5bb..863d9f2f 100644 --- a/backend/ormconfig.js +++ b/backend/ormconfig.js @@ -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", diff --git a/docker-compose.yml b/docker-compose.yml index 6ffbe003..6ffe790c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: @@ -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: