FrancescoXX / FrancescoXX/fullstack-next-node-postgres

need to create table inside the db

Open
#1 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
68
Forks
32
PR merge metrics
No merged PRs in 30d

Description

we need to create a table inside the Postgres database from the schema after the db and backend are up and running other we will get an error when we request the backend to create, update, delete a user cuz we don't have a table inside the db container

here is my solution we can remove 'CMD' to run the server form [backend.dockerfile](https://github.com/FrancescoXX/fullstack-next-node-postgres/blob/main/backend/backend.dockerfile) and this command inside [compose.yaml](https://github.com/FrancescoXX/fullstack-next-node-postgres/blob/main/compose.yaml) file

```yaml
command: sh -c "npm run start && npx prisma migrate dev --name init"
depends_on:
- db
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.