Skip to content

Commit

Permalink
Merge pull request #472 from panoratech/docker-hc
Browse files Browse the repository at this point in the history
🐛 Added docker port on API Container
  • Loading branch information
rflihxyz authored Jun 1, 2024
2 parents 106779e + 659dc5a commit 8d80c0e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 12 deletions.
2 changes: 0 additions & 2 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 1 addition & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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}
Expand Down
2 changes: 2 additions & 0 deletions packages/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

# # # # # # # # # # # #
Expand Down
6 changes: 1 addition & 5 deletions packages/api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

0 comments on commit 8d80c0e

Please sign in to comment.