From 68105f22f3cff7c81aabdfd03092fe136a6685e2 Mon Sep 17 00:00:00 2001 From: Rachid F Date: Fri, 31 May 2024 18:01:01 -0700 Subject: [PATCH 1/3] :bug: Added docker port on API Container --- packages/api/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/api/Dockerfile b/packages/api/Dockerfile index dfaba9bb3..5207ae56d 100644 --- a/packages/api/Dockerfile +++ b/packages/api/Dockerfile @@ -54,6 +54,8 @@ WORKDIR /app/packages/api # # # # # # # # # # # # # DEV: Maintain the /app/packages/api folder as context (Breaking) # # # # # # # # # # # # + +EXPOSE 3000 CMD node dist/src/main.js # # # # # # # # # # # # From f9f71d435d2e537cb99aac769393a58e5f9c1bd0 Mon Sep 17 00:00:00 2001 From: Rachid F Date: Fri, 31 May 2024 20:51:21 -0700 Subject: [PATCH 2/3] :wrench: Removed Hostname and port injection --- packages/api/src/main.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/api/src/main.ts b/packages/api/src/main.ts index 8d60cc284..61b1ccaf2 100644 --- a/packages/api/src/main.ts +++ b/packages/api/src/main.ts @@ -29,10 +29,6 @@ async function bootstrap() { app.useGlobalInterceptors(new LoggerErrorInterceptor()); app.use(cookieParser()); - - // Passing a host is required by some PaaS providers such as flightcontrol - const port = process.env.BACKEND_PORT || 3000; - const host = process.env.BACKEND_HOSTNAME || '0.0.0.0'; - await app.listen(port, host); + await app.listen(3000); } bootstrap(); From 659dc5ae25eaf36f6bb101efd76aadfdadc6c079 Mon Sep 17 00:00:00 2001 From: Rachid F Date: Fri, 31 May 2024 20:53:14 -0700 Subject: [PATCH 3/3] :coffin: Removed dead variables --- docker-compose.dev.yml | 2 -- docker-compose.source.yml | 2 -- docker-compose.yml | 4 +--- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 974f73032..795d528e8 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -36,8 +36,6 @@ services: REDIS_HOST: ${REDIS_HOST} REDIS_PASS: ${REDIS_PASS} REDIS_PORT: ${REDIS_PORT} - BACKEND_HOSTNAME: ${BACKEND_HOSTNAME} - BACKEND_PORT: ${BACKEND_PORT} ENCRYPT_CRYPTO_SECRET_KEY: ${ENCRYPT_CRYPTO_SECRET_KEY} HUBSPOT_CRM_CLOUD_CLIENT_ID: ${HUBSPOT_CRM_CLOUD_CLIENT_ID} HUBSPOT_CRM_CLOUD_CLIENT_SECRET: ${HUBSPOT_CRM_CLOUD_CLIENT_SECRET} diff --git a/docker-compose.source.yml b/docker-compose.source.yml index 517a4af94..ed4ff3808 100644 --- a/docker-compose.source.yml +++ b/docker-compose.source.yml @@ -36,8 +36,6 @@ services: JWT_SECRET: ${JWT_SECRET} REDIS_HOST: ${REDIS_HOST} REDIS_PASS: ${REDIS_PASS} - REDIS_PORT: ${REDIS_PORT} - BACKEND_HOSTNAME: ${BACKEND_HOSTNAME} BACKEND_PORT: ${BACKEND_PORT} ENCRYPT_CRYPTO_SECRET_KEY: ${ENCRYPT_CRYPTO_SECRET_KEY} HUBSPOT_CRM_CLOUD_CLIENT_ID: ${HUBSPOT_CRM_CLOUD_CLIENT_ID} diff --git a/docker-compose.yml b/docker-compose.yml index 0912af5b1..be3844d54 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,7 +21,7 @@ services: - ./packages/api/scripts/seed.sql:/docker-entrypoint-initdb.d/seed.sql networks: - backend - + api: image: panoradotdev/backend-api:selfhosted environment: @@ -31,8 +31,6 @@ services: REDIS_HOST: ${REDIS_HOST} REDIS_PASS: ${REDIS_PASS} REDIS_PORT: ${REDIS_PORT} - BACKEND_HOSTNAME: ${BACKEND_HOSTNAME} - BACKEND_PORT: ${BACKEND_PORT} ENCRYPT_CRYPTO_SECRET_KEY: ${ENCRYPT_CRYPTO_SECRET_KEY} HUBSPOT_CRM_CLOUD_CLIENT_ID: ${HUBSPOT_CRM_CLOUD_CLIENT_ID} HUBSPOT_CRM_CLOUD_CLIENT_SECRET: ${HUBSPOT_CRM_CLOUD_CLIENT_SECRET}