Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SKT-44: Connected to the Postgres TypeORM. #8

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Conversation

prasharma0
Copy link

@prasharma0 prasharma0 commented Jul 18, 2022

Summary
Linkup with the Postgres

Description

  • created docker command for Postgres TypeORM
  • created a new directory that includes controller, modules, and schemas
  • created a new service that provides information to the controller
  • created adding data and then fetching it from the database.

@prasharma0 prasharma0 requested review from bhuwantm and iampujan July 18, 2022 09:58
@bhuwantm bhuwantm changed the title SKT-0:Connected to the Postgres TypeORM. SKT-44: Connected to the Postgres TypeORM. Jul 21, 2022
command: npm run start:debug
depends_on:
- postgres
environment:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use environment file instead of hard coding it in here.

networks:
- nesjs-network
- "35000:5432"
environment:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use environment file.

POSTGRES_USER: xyz
POSTGRES_PASSWORD: xyz
POSTGRES_DB: db

volumes:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we need to have persistent data, we need to volume map data in postgres container to our container. Research about this and have a clear understanding.

volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
- ./node_modules:/usr/src/app/node_modules
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are these folders being mapped?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants