Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sequelize & migration #1

Merged
merged 4 commits into from
Jun 4, 2018
Merged

Add sequelize & migration #1

merged 4 commits into from
Jun 4, 2018

Conversation

inDream
Copy link

@inDream inDream commented Jun 1, 2018

Connects likecoin#5

Copy link
Owner

@rickmak rickmak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please try to separate the seed data and migration.

@@ -0,0 +1,8 @@
module.exports = {
development: {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think docker is a good env name in current setup. It tells this setting is assuming docker setup and the setting are passing via envvar.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sequelize-cli use development as config key, need to change NODE_ENV or add env argument if want to change this.

- ./pages:/usr/src/app/pages
- ./plugins:/usr/src/app/plugins
- ./server:/usr/src/app/server
- ./static:/usr/src/app/static
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we want this?

I assume you want to keep the node_modules inside docker and outside docker is separated.

This setup have potential when developer adding a new folder and forgot to add here. I prefer the original setup.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Map node_modules into docker is slow

{ name: 'Alexandre' },
{ name: 'Pooya' },
{ name: 'Sébastien' },
])),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seed data and migration is better separated.

@@ -1,16 +1,25 @@
version: '2'
version: '3'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good, Sorry I don't use the latest version.

@rickmak rickmak merged commit c243a16 into rickmak:master Jun 4, 2018
@inDream inDream deleted the add-sequelize branch June 6, 2018 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants