Comments (7)
Take a look here: https://github.com/kriasoft/nodejs-api-starter/blob/master/config/postgres-initdb.sh#L8
from relay-starter-kit.
There was a missing database error initially too.
I think it was due to missing entries in the hosts file.
After adding those to my hosts file manually I did the following to try and recreate the database and it worked
docker-compose down
docker-compose up
Does docker add the entries to hosts file automatically?
Errors I noticed
api_1 | Node.js API server is listening on http://api:8080/
api_1 | Error: getaddrinfo ENOTFOUND db db:5432
api_1 | Starting 'run'...
api_1 | Starting 'db-migrate'...
db_1 | FATAL: database "dev" does not exist
db_1 | FATAL: database "dev" does not exist
db_1 | FATAL: database "dev" does not exist
api_1 | error: database "dev" does not exist
api_1 | at Connection.parseE (/usr/src/app/node_modules/pg/lib/connection.js:567:11)
api_1 | at Connection.parseMessage (/usr/src/app/node_modules/pg/lib/connection.js:391:17)
api_1 | at Socket.<anonymous> (/usr/src/app/node_modules/pg/lib/connection.js:129:22)
api_1 | at emitOne (events.js:115:13)
api_1 | at Socket.emit (events.js:210:7)
api_1 | at addChunk (_stream_readable.js:252:12)
api_1 | at readableAddChunk (_stream_readable.js:239:11)
api_1 | at Socket.Readable.push (_stream_readable.js:197:10)
api_1 | at TCP.onread (net.js:588:20)
from relay-starter-kit.
I tried installing it on a new system today and got this error.
/docker-entrypoint-initdb.d/initdb.sh: line 2: $'\r': command not found
from relay-starter-kit.
Just to be clear, are we talking about running the app on a dev machine, or you're trying to deploy it? The docker-compose.yml
in this project is intended to be used in a development environment.
from relay-starter-kit.
Yup, that was when trying to run it on a dev machine through docker.
from relay-starter-kit.
One thing to node is that /docker-entrypoint-initdb.d/initdb.sh
is only executed once when "data" volume is created (run docker volume ls
to see the list of volumes). If the "dev" database is missing, you can either create it manually or remove the "data" volume and try running "docker compose up" again.
from relay-starter-kit.
I just included CREATE EXTENSION "uuid-ossp";
into the migration file.
from relay-starter-kit.
Related Issues (20)
- Adding controller/service layer for business logic HOT 3
- MongoDB instead of PostgreSQL HOT 1
- Where is the Passport.js implementation? HOT 1
- Dependabot can't resolve your JavaScript dependency files
- File Upload HOT 3
- Dependabot can't resolve your JavaScript dependency files
- Dependabot can't resolve your JavaScript dependency files
- big int HOT 1
- SyntaxError: Unexpected token = HOT 2
- Missing quotation marks in setup.js HOT 2
- Feature Request: "New Feature Walkthrough"
- Add the flexibility of multiple roles HOT 1
- Bug with emails that have "." in them breaks username requirements
- README.md out of date - no "setup" script HOT 3
- Nightly build fails
- Account settings page does not update
- docker image for the repo HOT 1
- error while run yarn setup HOT 1
- Readme.md has not been updated. HOT 1
- app-deploy.js file does not exists
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from relay-starter-kit.