Closed fititnt closed 6 years ago
Attaching to uwazidocker_uwazi_1
uwazi_1 | No data detected. Assuming need to install database from blank state
uwazi_1 | yarn run v1.5.1
uwazi_1 | $ ./database/blank_state.sh
uwazi_1 |
uwazi_1 |
uwazi_1 | Deleting uwazi_development database
uwazi_1 | ./database/blank_state.sh: line 7: mongo: command not found
uwazi_1 | ./database/blank_state.sh: line 8: mongorestore: command not found
uwazi_1 | error An unexpected error occurred: "Command failed.
uwazi_1 | Exit code: 127
uwazi_1 | Command: sh
uwazi_1 | Arguments: -c ./database/blank_state.sh
uwazi_1 | Directory: /home/node/uwazi
uwazi_1 | Output:
uwazi_1 | ".
uwazi_1 | info If you think this is a bug, please open a bug report with the information provided in "/home/node/uwazi/yarn-error.log".
uwazi_1 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
uwazi_1 | yarn run v1.5.1
uwazi_1 | $ node run.js ./database/reindex_elastic.js
uwazi_1 | (node:56) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
uwazi_1 | (node:56) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
uwazi_1 | Done in 7.18s.
uwazi_1 | yarn run v1.5.1
uwazi_1 | $ export NODE_ENV=production; node server.js
uwazi_1 | connection error: { MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
uwazi_1 | at Pool.<anonymous> (/home/node/uwazi/node_modules/mongoose/node_modules/mongodb-core/lib/topologies/server.js:328:35)
uwazi_1 | at emitOne (events.js:96:13)
uwazi_1 | at Pool.emit (events.js:188:7)
uwazi_1 | at Connection.<anonymous> (/home/node/uwazi/node_modules/mongoose/node_modules/mongodb-core/lib/connection/pool.js:274:12)
uwazi_1 | at Connection.g (events.js:292:16)
uwazi_1 | at emitTwo (events.js:106:13)
uwazi_1 | at Connection.emit (events.js:191:7)
uwazi_1 | at Socket.<anonymous> (/home/node/uwazi/node_modules/mongoose/node_modules/mongodb-core/lib/connection/connection.js:177:49)
uwazi_1 | at Socket.g (events.js:292:16)
uwazi_1 | at emitOne (events.js:96:13)
uwazi_1 | at Socket.emit (events.js:188:7)
uwazi_1 | at emitErrorNT (net.js:1296:8)
uwazi_1 | at _combinedTickCallback (internal/process/next_tick.js:80:11)
uwazi_1 | at process._tickCallback (internal/process/next_tick.js:104:9)
uwazi_1 | name: 'MongoError',
uwazi_1 | message: 'failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]' }
uwazi_1 | (node:87) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
uwazi_1 | Done in 28.39s.
uwazidocker_uwazi_1 exited with code 0
The next commit already is working fully on docker, but databases need be already working, e.g. initialized by other means
1.78GB after #8. Could use much lower storage
# fititnt at bravo in /alligo/code/fititnt/uwazi-docker on git:master x [0:35:21]
$ docker images | grep uwazi
uwazidocker_uwazi latest 344774fbe62b About a minute ago 1.78GB
Same as #3, but the Uwazi should have a minimum working Dockerfile.
It does not need to be optimized for size or use multi-stage builds.