FrancescoXX / FrancescoXX/fullstack-next-node-postgres
need to create table inside the db
- Vorherrschende Sprache
- TypeScript
- Sterne
- 68
- Forks
- 32
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
```
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Lies zunächst backend/backend.dockerfile und compose.yaml, starte dann die Dienste, um den Fehler wegen der fehlenden Tabelle zu reproduzieren. Überprüfe, dass die Datenbank nach dem Start der Datenbank und des Backends aus dem Schema initialisiert wird, und bestätige, dass die Anfragen zum Erstellen, Aktualisieren und Löschen von Benutzern ohne den Fehler funktionieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- docker-compose, postgresql, typescript
- Bereich
- backend, database, devops
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100