FrancescoXX / FrancescoXX/fullstack-next-node-postgres

need to create table inside the db

未关闭
#1 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
68
派生
32
PR 合并指标
30 天内没有已合并 PR

描述

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
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。