mozilla

Broken Docker Compose File with latest talk version


#1

Hi all,

something changed in the previous versions. Running the docker-compose file you offer for a quick start, runs into some connection issue in the very last step of the installation. Using not the latest but for example version 4.3.1 (image: coralproject/talk:4.3.1) image, everything runs as expected.

Best,
Simon


#2

Are you still having this problem? Asking since you seem to have made progress in the other thread :slight_smile:


#3

Hey kgardnr,

unfortunately I get the following issue when starting the setup of talk.

I can not really cut the scope. At the beginning I thought it is related to the latest talk version, but now that I run the setup of version 4.3.1 several times, it doesn´t work either. In the log files from the talk docker instance I can not find any serious issues.


#4

Checking the logs once more, I found the following:

ErrSettingsNotInit {
  message: 'Talk is currently not setup. Please proceed to our web installer at $ROOT_URL/admin/install or run ./bin/cli-setup. Visit https://docs.coralproject.net/talk/ for more information on installation and configuration instructions',
  stack: 'Error: Talk is currently not setup. Please proceed to our web installer at $ROOT_URL/admin/install or run ./bin/cli-setup. Visit https://docs.coralproject.net/talk/ for more information on installation and configuration instructions\n    at new ExtendableError (/usr/src/app/errors.js:8:18)\n    at new TalkError (/usr/src/app/errors.js:23:5)\n    at new ErrSettingsNotInit (/usr/src/app/errors.js:249:5)\n    at retrieve (/usr/src/app/services/settings.js:20:11)\n    at <anonymous>\n    at process._tickCallback (internal/process/next_tick.js:188:7)',
  status: 500,
  translation_key: null,
  metadata: {} }

The information makes sense in general because the setup has not yet been completed. But at the point of time I am getting this message, I´m already on /admin/install.


#5

Hey Simon,

Can you try doing the setup via the CLI?

bin/cli setup


#6

Hi Kim,

yes and no. Running the cli-setup file for the docker-compose solution is not possible, is it? I can try it with the source code if you tell me how to inject the environment variables. Just executing the cli-setup file runs into the msg

Error: TALK_ROOT_URL must be provided

Best,
Simon


#7

You can run bash from Docker, by doing this:

docker-compose run --rm talk sh

where “talk” is the name of your talk docker instance

If you’re getting that error though, make sure you have that required variable set in your .env file.


#8

And here the message;:

/usr/src/app/bin # ./cli-setup
ErrSettingsInit {
  message: 'settings are already initialized',
  stack: 'Error: settings are already initialized\n    at new ExtendableError (/usr/src/app/errors.js:8:18)\n    at new TalkError (/usr/src/app/errors.js:23:5)\n    at new ErrSettingsInit (/usr/src/app/errors.js:259:5)\n    at performSetup (/usr/src/app/bin/cli-setup:44:11)\n    at <anonymous>\n    at process._tickCallback (internal/process/next_tick.js:188:7)',
  status: 500,
  translation_key: null,
  metadata: {} }

#9

Do you have that variable set in your env file?


#10

(or wherever you’re setting it)


#11

My compose-compose.yml file looks like this:

# For details on the syntax of docker-compose.yml files, check out:
# https://docs.docker.com/compose/compose-file/compose-file-v2/

version: '2'
services:
  talk:
    image: coralproject/talk:latest
    restart: always
    ports:
      - "3000:3000"
    depends_on:
      - mongo
      - redis
    environment:
      - NODE_ENV=development # remove this line in production
      - TALK_MONGO_URL=mongodb://mongo/talk
      - TALK_REDIS_URL=redis://redis
      - TALK_ROOT_URL=http://127.0.0.1:3000
      - TALK_PORT=3000
      - TALK_JWT_SECRET=password
  mongo:
    image: mongo:latest
    restart: always
    volumes:
      - mongo:/data/db
  redis:
    image: redis:latest
    restart: always
    volumes:
      - redis:/data
volumes:
  mongo:
    external: false
  redis:
    external: false

Pretty standard I would say.


#12

What I tried now is:

Now, I see a different message: Network error: Preflight response is not successful


#13

I found the issue. Either I have to set

TALK_ROOT_URL=http://127.0.0.1:3000

and open http://127.0.0.1:3000/admin/install (not localhost:3000) or I set

TALK_ROOT_URL=http://localhost:3000

and open http://127.0.0.1:3000/admin/install (not 127.0.0.1).

I am not sure if it has anything to do with this project or rather a local network configuration on my Mac. Anyway, thanks for your time Kim!