question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migrations/seeds doesn't work in Docker and production

See original GitHub issue

Because src/server/migrations isn’t included at all and not ts-node and required directories either. Could be fixed by using a npm run migrate:prod for example. If I find some time in the coming days I’ll put up a PR!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sheshbabucommented, Apr 13, 2020

@joenas @mzch This should be fixed in the latest build, sorry for the delay.

0reactions
mzchcommented, Feb 15, 2020

I tried to rebuild freshlytics from sources, and when doing npm run migrate, it reported as below:

error: server "pipelinedb" does not exist
    at Connection.parseE (/srv/freshlytics/freshlytics/node_modules/pg/lib/connection.js:602:11)
    at Connection.parseMessage (/srv/freshlytics/freshlytics/node_modules/pg/lib/connection.js:399:19)
    at Socket.<anonymous> (/srv/freshlytics/freshlytics/node_modules/pg/lib/connection.js:121:22)
    at Socket.emit (events.js:223:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:181:23)

Yes, no foreign server pipelinedb. And if it’s fixed by adding CREATE SERVER "pipelinedb" FOREIGN DATA WRAPPER postgres_fdw; to sql, then CREATE VIEW ... WITH (actioin=materialize) caused error, too.

error: unrecognized parameter "action"
    at Connection.parseE (/srv/freshlytics/freshlytics/node_modules/pg/lib/connection.js:602:11)
    at Connection.parseMessage (/srv/freshlytics/freshlytics/node_modules/pg/lib/connection.js:399:19)
    at Socket.<anonymous> (/srv/freshlytics/freshlytics/node_modules/pg/lib/connection.js:121:22)
    at Socket.emit (events.js:223:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:181:23)

How can this be fixed? Using PostgreSQL 11 and 12 both has the same error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrations / Seeds Production Ready? #422 - sequelize/cli
db:seed:all doesn't appear to work when run multiple times. For migrations, a row is inserted into SequelizeMeta by the name of the file...
Read more >
Using Docker with NodeJS in development and production
In this article we'll create a production Docker image for a Node/Express app. We'll also add Docker to the development process using Docker...
Read more >
Use Compose in production - Docker Documentation
Guide to using Docker Compose in production. ... If you want to scale up your application, you can run Compose apps on a...
Read more >
How to Fix and Debug Docker Containers Like a Superhero
Container errors are tricky to diagnose, but some investigative magic works wonders. Read along to learn how to debug Docker containers.
Read more >
Docker development best practices - Docker Documentation
Differences in development and production environments ; Don't worry about time drift. Always run an NTP client on the Docker host...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found