Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "name": "...",
- "version": "1.0.0",
- "description": "...",
- "scripts": {
- "prestart": "node ./node_modules/knex/lib/bin/cli.js migrate:latest",
- "poststart": "..."
- }
- }
- knex.migrate.latest([config])
- container_commands:
- 01_node_binary:
- command: "ln -sf `ls -td /opt/elasticbeanstalk/node-install/node-* | head -1`/bin/node /bin/node"
- leader_only: true
- 02_npm_binary:
- command: "ln -sf `ls -td /opt/elasticbeanstalk/node-install/node-* | head -1`/bin/npm /bin/npm"
- leader_only: true
- 03_migrate_db:
- command: "sudo DB_HOST=${DB_HOST} DB_PORT=${DB_PORT} DB_NAME=${DB_NAME} DB_USER=${DB_USER} DB_PASSWORD=${DB_PASSWORD} npm run db:migration:run"
- leader_only: true
- ...
- scripts: {
- "db:migration:run": "knex migrate:latest"
- }
- "scripts": {
- "start": "npx knex migrate:latest && node server.js"
- }
Add Comment
Please, Sign In to add comment