Installation document for ubuntu server

I need to set up my ubuntu server for twake chat server for my internal communication

We cannot help you if you don’t give us more details on the errors you are facing.
https://doc.twake.app/installation

Did you successfully install docker-compose ?

Yes it install successfully but both are not working

Ok, then you are starting Twake with ‘docker-compose up -d’.
Twake will be running on the port 8000 by default.
After this command, what is the output of ‘curl localhost:8000’ ?

You can see the logs of Twake using this: ‘docker-compose -f --tail 100 logs’
If you find a ‘process_name exited with code 0’ somewhere, tell me.

OK, i will run with this, unless you want me to start a new thread.

Followed instructions at https://doc.twake.app/installation:
$ cat /etc/issue
Linux Mint 19.1 Tessa

$ docker --version
Docker version 20.10.3, build 48d30b5

$ docker-compose --version
docker-compose version 1.22.0, build f46880fe

$ git clone https://github.com/TwakeApp/Twake.git
Cloning into ‘Twake’…
remote: Enumerating objects: 797, done.
remote: Counting objects: 100% (797/797), done.
remote: Compressing objects: 100% (672/672), done.
remote: Total 22164 (delta 248), reused 440 (delta 114), pack-reused 21367
Receiving objects: 100% (22164/22164), 39.26 MiB | 1.75 MiB/s, done.
Resolving deltas: 100% (8352/8352), done.

$ cd Twake/twake/

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

$ docker-compose up -d
ERROR: The Compose file ‘./docker-compose.yml’ is invalid because:
Unsupported config option for services.rabbitmq: ‘mem_limit’
Unsupported config option for services.nginx: ‘volumes_from’

(after some web searching, and changing “version” string in docker-compose.yml from “3.4” to “2”)

$ docker-compose up -d
Starting twake_scylladb_1 … done
Starting twake_rabbitmq_1 … done
Starting twake_php_1 … done
Starting twake_node_1 … done
Starting twake_nginx_1 … done

$ curl localhost:8000
curl: (7) Failed to connect to localhost port 8000: Connection refused

$ docker-compose -f --tail 100 logs
No such command: 100

HOWEVER, I also happen to be running the “portainer” tool on my test server, and so can see logs from 2 of the stack’s containers that are abnormally-ending.

Twake_node_1 log:

@twake/twake-backend@1.0.0 serve /usr/src/app

node dist/server.js

internal/modules/cjs/loader.js:834
\00\00\00\00\00\00
throw err;

^

Error: Cannot find module ‘/usr/src/app/dist/server.js’

at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)

at Function.Module._load (internal/modules/cjs/loader.js:687:27)

at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)

at internal/main/run_main_module.js:17:47 {

code: ‘MODULE_NOT_FOUND’,

requireStack: []

}

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! @twake/twake-backend@1.0.0 serve: node dist/server.js

npm ERR! Exit status 1
\00\00\00\00\00\00

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 WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:

npm ERR! /root/.npm/_logs/2021-03-08T21_35_17_799Z-debug.log

@twake/twake-backend@1.0.0 serve /usr/src/app

node dist/server.js

internal/modules/cjs/loader.js:834
\00\00\00\00\00\00
throw err;

^

Error: Cannot find module ‘/usr/src/app/dist/server.js’

at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)

at Function.Module._load (internal/modules/cjs/loader.js:687:27)

at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)

at internal/main/run_main_module.js:17:47 {

code: ‘MODULE_NOT_FOUND’,

requireStack: []

}

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! @twake/twake-backend@1.0.0 serve: node dist/server.js

npm ERR! Exit status 1
\00\00\00\00\00\00

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 WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:

npm ERR! /root/.npm/_logs/2021-03-08T23_21_07_149Z-debug.log

Twake_nginx_1 log:

nginx: [emerg] host not found in upstream “node” in /etc/nginx/sites-enabled/site:34,
nginx: [emerg] host not found in upstream “node” in /etc/nginx/sites-enabled/site:34,

BTW, yes, I did notice that the portainer appliance container wants to bind to port 9000.

After shutting down that container & retrying the “docker-compose up” command, i still see the node and nginx containers in your stack die immediately after startup:

$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
40afbfad1dfb twaketech/twake-php “/bin/sh -c '/entryp…” 6 seconds ago Up 3 seconds 9000/tcp twake_php_1
257be6c1c1a2 rabbitmq:3.8.9-management-alpine “docker-entrypoint.s…” 8 seconds ago Up 5 seconds 4369/tcp, 5671-5672/tcp, 15671/tcp, 15691-15692/tcp, 25672/tcp, 0.0.0.0:15672->15672/tcp twake_rabbitmq_1
63766a621f5b scylladb/scylla:4.1.0 “/docker-entrypoint.…” 8 seconds ago Up 6 seconds 22/tcp, 7000-7001/tcp, 9160/tcp, 9180/tcp, 10000/tcp, 0.0.0.0:9042->9042/tcp twake_scylladb_1