Find the tutorial here
nattri07 / myawesomeapp Goto Github PK
View Code? Open in Web Editor NEWSetup and deploy a basic node application using express, knex and docker
Setup and deploy a basic node application using express, knex and docker
Find the tutorial here
Hi,
I read your article and decided to make this app run in my machine. As you said I executed docker-compose up
and it ran, but it gave an error as follows
Creating myawesomeapp_mysql_1 ... done
Creating myawesomeapp_myawesomeapp_1 ... done
Attaching to myawesomeapp_mysql_1, myawesomeapp_myawesomeapp_1
mysql_1 | 2020-10-07 00:49:36+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.21-1debian10 started.
mysql_1 | 2020-10-07 00:49:38+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
mysql_1 | 2020-10-07 00:49:38+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.21-1debian10 started.
mysql_1 | 2020-10-07 00:49:38+00:00 [Note] [Entrypoint]: Initializing database files
mysql_1 | 2020-10-07T00:49:38.628455Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.21) initializing of server in progress as process 43
mysql_1 | 2020-10-07T00:49:38.639601Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
myawesomeapp_1 | npm info it worked if it ends with ok
myawesomeapp_1 | npm info using [email protected]
myawesomeapp_1 | npm info using [email protected]
myawesomeapp_1 | npm info lifecycle [email protected]~premigrate: [email protected]
myawesomeapp_1 | npm info lifecycle [email protected]~migrate: [email protected]
myawesomeapp_1 |
myawesomeapp_1 | > [email protected] migrate /www/myAwesomeApp
myawesomeapp_1 | > knex migrate:latest
myawesomeapp_1 |
myawesomeapp_1 | Using environment: development
myawesomeapp_1 | Error: connect ECONNREFUSED 172.22.0.2:3306
myawesomeapp_1 | at Object.exports._errnoException (util.js:1022:11)
myawesomeapp_1 | at exports._exceptionWithHostPort (util.js:1045:20)
myawesomeapp_1 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)
myawesomeapp_1 | --------------------
myawesomeapp_1 | at Protocol._enqueue (/www/myAwesomeApp/node_modules/mysql/lib/protocol/Protocol.js:144:48)
myawesomeapp_1 | at Protocol.handshake (/www/myAwesomeApp/node_modules/mysql/lib/protocol/Protocol.js:51:23)
myawesomeapp_1 | at Connection.connect (/www/myAwesomeApp/node_modules/mysql/lib/Connection.js:116:18)
myawesomeapp_1 | at /www/myAwesomeApp/node_modules/knex/lib/dialects/mysql/index.js:106:18
myawesomeapp_1 | at Promise._execute (/www/myAwesomeApp/node_modules/bluebird/js/release/debuggability.js:384:9)
myawesomeapp_1 | at Promise._resolveFromExecutor (/www/myAwesomeApp/node_modules/bluebird/js/release/promise.js:518:18)
myawesomeapp_1 | at new Promise (/www/myAwesomeApp/node_modules/bluebird/js/release/promise.js:103:10)
myawesomeapp_1 | at Client_MySQL.acquireRawConnection (/www/myAwesomeApp/node_modules/knex/lib/dialects/mysql/index.js:104:12)
myawesomeapp_1 | at Object.create (/www/myAwesomeApp/node_modules/knex/lib/client.js:239:16)
myawesomeapp_1 | at Pool._createResource (/www/myAwesomeApp/node_modules/generic-pool/lib/generic-pool.js:354:17)
myawesomeapp_1 | at Pool.dispense [as _dispense] (/www/myAwesomeApp/node_modules/generic-pool/lib/generic-pool.js:314:10)
myawesomeapp_1 | at Pool.acquire (/www/myAwesomeApp/node_modules/generic-pool/lib/generic-pool.js:436:8)
myawesomeapp_1 | at /www/myAwesomeApp/node_modules/knex/lib/client.js:289:19
myawesomeapp_1 | at Promise._execute (/www/myAwesomeApp/node_modules/bluebird/js/release/debuggability.js:384:9)
myawesomeapp_1 | at Promise._resolveFromExecutor (/www/myAwesomeApp/node_modules/bluebird/js/release/promise.js:518:18)
myawesomeapp_1 | at new Promise (/www/myAwesomeApp/node_modules/bluebird/js/release/promise.js:103:10)
myawesomeapp_1 |
myawesomeapp_1 | npm info lifecycle [email protected]~migrate: Failed to exec migrate script
myawesomeapp_1 | npm ERR! Linux 5.4.0-47-generic
myawesomeapp_1 | npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "migrate"
myawesomeapp_1 | npm ERR! node v6.9.4
myawesomeapp_1 | npm ERR! npm v3.10.10
myawesomeapp_1 | npm ERR! code ELIFECYCLE
myawesomeapp_1 | npm ERR! [email protected] migrate: `knex migrate:latest`
myawesomeapp_1 | npm ERR! Exit status 1
myawesomeapp_1 | npm ERR!
myawesomeapp_1 | npm ERR! Failed at the [email protected] migrate script 'knex migrate:latest'.
myawesomeapp_1 | npm ERR! Make sure you have the latest version of node.js and npm installed.
myawesomeapp_1 | npm ERR! If you do, this is most likely a problem with the myAwesomeApp package,
myawesomeapp_1 | npm ERR! not with npm itself.
myawesomeapp_1 | npm ERR! Tell the author that this fails on your system:
myawesomeapp_1 | npm ERR! knex migrate:latest
myawesomeapp_1 | npm ERR! You can get information on how to open an issue for this project with:
myawesomeapp_1 | npm ERR! npm bugs myAwesomeApp
myawesomeapp_1 | npm ERR! Or if that isn't available, you can get their info via:
myawesomeapp_1 | npm ERR! npm owner ls myAwesomeApp
myawesomeapp_1 | npm ERR! There is likely additional logging output above.
myawesomeapp_1 |
myawesomeapp_1 | npm ERR! Please include the following file with any support request:
myawesomeapp_1 | npm ERR! /www/myAwesomeApp/npm-debug.log
myawesomeapp_1 | npm info it worked if it ends with ok
myawesomeapp_1 | npm info using [email protected]
myawesomeapp_1 | npm info using [email protected]
myawesomeapp_1 | npm info lifecycle [email protected]~prestart-docker: [email protected]
myawesomeapp_1 | npm info lifecycle [email protected]~start-docker: [email protected]
myawesomeapp_1 |
myawesomeapp_1 | > [email protected] start-docker /www/myAwesomeApp
myawesomeapp_1 | > pm2-docker start pm2_configs/config.json
myawesomeapp_1 |
myawesomeapp_1 | /usr/local/lib/node_modules/pm2/node_modules/chalk/source/index.js:103
myawesomeapp_1 | ...styles,
myawesomeapp_1 | ^^^
myawesomeapp_1 | SyntaxError: Unexpected token ...
myawesomeapp_1 | at Object.exports.runInThisContext (vm.js:76:16)
myawesomeapp_1 | at Module._compile (module.js:542:28)
myawesomeapp_1 | at Object.Module._extensions..js (module.js:579:10)
myawesomeapp_1 | at Module.load (module.js:487:32)
myawesomeapp_1 | at tryModuleLoad (module.js:446:12)
myawesomeapp_1 | at Function.Module._load (module.js:438:3)
myawesomeapp_1 | at Module.require (module.js:497:17)
myawesomeapp_1 | at require (internal/module.js:20:19)
myawesomeapp_1 | at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/API.js:15:21)
myawesomeapp_1 | at Module._compile (module.js:570:32)
myawesomeapp_1 |
myawesomeapp_1 | npm info lifecycle [email protected]~start-docker: Failed to exec start-docker script
myawesomeapp_1 | npm ERR! Linux 5.4.0-47-generic
myawesomeapp_1 | npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start-docker"
myawesomeapp_1 | npm ERR! node v6.9.4
myawesomeapp_1 | npm ERR! npm v3.10.10
myawesomeapp_1 | npm ERR! code ELIFECYCLE
myawesomeapp_1 | npm ERR! [email protected] start-docker: `pm2-docker start pm2_configs/config.json`
myawesomeapp_1 | npm ERR! Exit status 1
myawesomeapp_1 | npm ERR!
myawesomeapp_1 | npm ERR! Failed at the [email protected] start-docker script 'pm2-docker start pm2_configs/config.json'.
myawesomeapp_1 | npm ERR! Make sure you have the latest version of node.js and npm installed.
myawesomeapp_1 | npm ERR! If you do, this is most likely a problem with the myAwesomeApp package,
myawesomeapp_1 | npm ERR! not with npm itself.
myawesomeapp_1 | npm ERR! Tell the author that this fails on your system:
myawesomeapp_1 | npm ERR! pm2-docker start pm2_configs/config.json
myawesomeapp_1 | npm ERR! You can get information on how to open an issue for this project with:
myawesomeapp_1 | npm ERR! npm bugs myAwesomeApp
myawesomeapp_1 | npm ERR! Or if that isn't available, you can get their info via:
myawesomeapp_1 | npm ERR! npm owner ls myAwesomeApp
myawesomeapp_1 | npm ERR! There is likely additional logging output above.
myawesomeapp_1 |
myawesomeapp_1 | npm ERR! Please include the following file with any support request:
myawesomeapp_1 | npm ERR! /www/myAwesomeApp/npm-debug.log
myawesomeapp_myawesomeapp_1 exited with code 1
mysql_1 | 2020-10-07T00:50:52.690105Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.