Cannot install Twake from docker

Hi there,

Just discovered Twake and I would like to test it. The server is debian 10 and I’m following the installation procedure on the documentation, but the following step fails

cp docker-compose.yml.dist docker-compose.yml

There is no docker-compose.yml.dist file, but docker-compose.yml.dist.dev, docker-compose.yml.dist.onpremise, and docker-compose.yml.dist.test, I’ve tried the three of them, and I see there are spawning different containers.

My guess is the most suitable would be docker-compose.yml.dist.onpremise, but it has an error when I run docker-compose:

ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services.nginx: 'volumes_from'

It seems volumes_from is deprecated on docker-compose v3, so I changed the version from “3.4” to “2”. And the it doesn’t give any error but then the twake_node_1 container doesn’t start, a docker logs twake_node_1 shows the following:

> @twake/twake-backend@1.0.0 serve /usr/src/app
> node --max-http-header-size=30000 dist/server.js


/usr/src/app/node_modules/config/lib/config.js:789
      throw new Error('Config file ' + fullFilename + ' cannot be read. Error code is: '+e2.code
      ^

Error: Config file /usr/src/app/config/production.json cannot be read. Error code is: EISDIR. Error message is: EISDIR: illegal operation on a directory, read
    at Config.util.parseFile (/usr/src/app/node_modules/config/lib/config.js:789:13)
    at /usr/src/app/node_modules/config/lib/config.js:619:26
    at Array.forEach (<anonymous>)
    at Config.util.loadFileConfigs (/usr/src/app/node_modules/config/lib/config.js:618:16)
    at new Config (/usr/src/app/node_modules/config/lib/config.js:116:27)
    at Object.<anonymous> (/usr/src/app/node_modules/config/lib/config.js:1459:31)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @twake/twake-backend@1.0.0 serve: `node --max-http-header-size=30000 dist/server.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @twake/twake-backend@1.0.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-05-25T07_56_23_589Z-debug.log

Any advise would be very appretiated.

Hello, your first guess was good, I updated the public documentation just now for future readers: Twake-Documentation/README.md at master · linagora/Twake-Documentation · GitHub

Thanks for the volume_from issue, it is not used anymore so you can also just remove that part (I just did it for next release, thanks again).

About your last error, you need to run the twake/start.sh script, it will start the containers in the right order and create the configuration.

Sorry for the misleading documentation!

Romaric

Thank you! I didn’t notice the start.sh script, anyway, twake_node_1 still fails to start with the same error o debian 10 and arch linux…