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

Some minor improvements for setup script #943

Merged
merged 2 commits into from Nov 17, 2018

Conversation

Projects
None yet
2 participants
@SISheogorath
Member

SISheogorath commented Sep 6, 2018

Since we use yarn for our container setup and try to enforce
dependencies, we should also use yarn in the setup script.

Some minor improvements for setup script
Since we use `yarn` for our container setup and try to enforce
dependencies, we should also use yarn in the setup script.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>

@SISheogorath SISheogorath added this to the 1.2.1 Release milestone Sep 6, 2018

@@ -11,7 +11,7 @@
"dev": "webpack --config webpack.config.js --progress --colors --watch",
"build": "webpack --config webpack.production.js --progress --colors --bail",
"postinstall": "bin/heroku",
"start": "node app.js",
"start": "npx sequelize db:migrate && node app.js",

This comment has been minimized.

@SISheogorath

SISheogorath Sep 24, 2018

Member

@ccoenen With this change, would you prefer to publish this change in 1.2.1 or 1.3.0?

This comment has been minimized.

@ccoenen

ccoenen Sep 25, 2018

Contributor

we don't mention npx anywhere as far as I know. How is this more stable than node node_modules/.bin/sequelize (I presume, I haven't tested it). Does it warrant mandating npx?

I think I'd rather see this in 1.3.

This comment has been minimized.

@SISheogorath

SISheogorath Sep 25, 2018

Member

I just checked, we can actually scratch the npx and simply use sequelize directly. It'll use the normal node way to resolve the the sequelize-cli instead of, how I just checked npx which may even installs it, when it can't find it.

Run db migrations on start
We should force db migrations to run on every start. This will minimize
the impact of breaking migrations in future. While it may causes some
issues with the next start since CodiMD won't start when the migrations
fail.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>

@SISheogorath SISheogorath force-pushed the SISheogorath:feature/improveSetup branch from 4855f95 to db59bb9 Sep 25, 2018

@SISheogorath SISheogorath merged commit 6f7fd74 into hackmdio:master Nov 17, 2018

2 checks passed

DCO All commits are signed off!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@SISheogorath SISheogorath deleted the SISheogorath:feature/improveSetup branch Nov 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment