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} 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 # # # # # # # # # # # # 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();