Open DracoMilesX opened 7 years ago
Having this same problem. Here are the full logs:
[32mlets-chat_1 |[0m > lets-chat@0.4.8 start /usr/src/app
[32mlets-chat_1 |[0m > node app.js
[32mlets-chat_1 |[0m
[32mlets-chat_1 |[0m open()
is deprecated in mongoose >= 4.11.0, use openUri()
instead, or set the useMongoClient
option if using connect()
or createConnection()
. See http://mongoosejs.com/docs/connections.html#use-mongo-client
[36mmongo_1 |[0m 2017-11-16T21:40:26.522+0000 I NETWORK [thread1] connection accepted from 172.18.0.4:55048 #1 (1 connection now open)
[36mmongo_1 |[0m 2017-11-16T21:40:26.523+0000 I NETWORK [thread1] connection accepted from 172.18.0.4:55050 #2 (2 connections now open)
[36mmongo_1 |[0m 2017-11-16T21:40:26.532+0000 I NETWORK [conn1] received client metadata from 172.18.0.4:55048 conn1: { driver: { name: "nodejs", version: "2.2.33" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.8.0-30-generic" }, platform: "Node.js v0.12.18, LE, mongodb-core: 2.1.17" }
[36mmongo_1 |[0m 2017-11-16T21:40:26.535+0000 I NETWORK [conn2] received client metadata from 172.18.0.4:55050 conn2: { driver: { name: "nodejs", version: "2.2.33" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.8.0-30-generic" }, platform: "Node.js v0.12.18, LE, mongodb-core: 2.1.17" }
[32mlets-chat_1 |[0m TypeError: undefined is not a function
[32mlets-chat_1 |[0m at Object.node app.js
[32mlets-chat_1 |[0m npm ERR! Exit status 1
[32mlets-chat_1 |[0m npm ERR!
[32mlets-chat_1 |[0m npm ERR! Failed at the lets-chat@0.4.8 start script 'node app.js'.
[32mlets-chat_1 |[0m npm ERR! This is most likely a problem with the lets-chat package,
[32mlets-chat_1 |[0m npm ERR! not with npm itself.
[32mlets-chat_1 |[0m npm ERR! Tell the author that this fails on your system:
[32mlets-chat_1 |[0m npm ERR! node app.js
[32mlets-chat_1 |[0m npm ERR! You can get information on how to open an issue for this project with:
[32mlets-chat_1 |[0m npm ERR! npm bugs lets-chat
[32mlets-chat_1 |[0m npm ERR! Or if that isn't available, you can get their info via:
[32mlets-chat_1 |[0m npm ERR!
[32mlets-chat_1 |[0m npm ERR! npm owner ls lets-chat
[32mlets-chat_1 |[0m npm ERR! There is likely additional logging output above.
[32mlets-chat_1 |[0m npm ERR! Linux 4.8.0-30-generic
[32mlets-chat_1 |[0m npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
[32mlets-chat_1 |[0m npm ERR! node v0.12.18
[32mlets-chat_1 |[0m npm ERR! npm v2.15.11
[32mlets-chat_1 |[0m npm ERR! path npm-debug.log.896050243
[32mlets-chat_1 |[0m npm ERR! code EACCES
[32mlets-chat_1 |[0m npm ERR! errno -13
[32mlets-chat_1 |[0m
[32mlets-chat_1 |[0m npm ERR! Error: EACCES, open 'npm-debug.log.896050243'
[32mlets-chat_1 |[0m npm ERR! at Error (native)
[32mlets-chat_1 |[0m npm ERR! { [Error: EACCES, open 'npm-debug.log.896050243'] errno: -13, code: 'EACCES', path: 'npm-debug.log.896050243' }
[32mlets-chat_1 |[0m npm ERR!
[32mlets-chat_1 |[0m npm ERR! Please try running this command again as root/Administrator.
[32mlets-chat_1 |[0m
[32mlets-chat_1 |[0m npm ERR! Please include the following file with any support request:
[32mlets-chat_1 |[0m npm ERR! /usr/src/app/npm-debug.log
[32mhj33bko1m_lets-chat_1 exited with code 1
Got it working. Changed to latest version of node, also had to remove the cache step, also changed the last line from npm start to node app.js.
Here's the working docker file. I'm going to be making changes to mine in my repo.
FROM node:latest MAINTAINER SD Elements
ENV PKG_JSON_URL=https://raw.githubusercontent.com/sdelements/lets-chat/master/package.json \ TAR_GZ_URL=https://github.com/sdelements/lets-chat/archive/master.tar.gz \ BUILD_DEPS='g++ gcc git make python' \ LCB_PLUGINS='lets-chat-ldap lets-chat-s3'
RUN mkdir -p /usr/src/app WORKDIR /usr/src/app
ADD $PKG_JSON_URL ./package.json
RUN set -x \ && apt-get update \ && apt-get install -y $BUILD_DEPS --no-install-recommends \ && rm -rf /var/lib/apt/lists/ \ && npm install --production \ && npm install $LCB_PLUGINS \ && npm dedupe \ && rm -rf /tmp/npm \ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $BUILD_DEPS
ADD $TAR_GZ_URL ./master.tar.gz
RUN tar -xzvf master.tar.gz \ && cp -a lets-chat-master/. . \ && rm -rf lets-chat-master
RUN chown node:node uploads \ && mkdir -p builtAssets \ && chown node:node builtAssets
ENV LCB_DATABASE_URI=mongodb://mongo/letschat \ LCB_HTTP_HOST=0.0.0.0 \ LCB_HTTP_PORT=8080 \ LCB_XMPP_ENABLE=true \ LCB_XMPP_PORT=5222
USER node
EXPOSE 8080 5222
VOLUME ["/usr/src/app/config"] VOLUME ["/usr/src/app/uploads"]
CMD ["node", "app.js"]
Tried with a fresh install for Docker but it won't start up
The docker run command I use:
Haven't changed the settings yet so everything would be default.