Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Docker-compose error URGENT

Open x5engine opened this issue 11 years ago • 9 comments

Hi I found this error when I run docker-compose ps (also not docker-compose ps -a isn't and when I run docker ps -a it says )

ind
  File "/code/build/docker-compose/out00-PYZ.pyz/compose.config", line 558, in load_yaml
  File "/code/build/docker-compose/out00-PYZ.pyz/yaml", line 93, in safe_load
  File "/code/build/docker-compose/out00-PYZ.pyz/yaml", line 71, in load
  File "/code/build/docker-compose/out00-PYZ.pyz/yaml.constructor", line 37, in get_single_data
  File "/code/build/docker-compose/out00-PYZ.pyz/yaml.composer", line 36, in get_single_node
  File "/code/build/docker-compose/out00-PYZ.pyz/yaml.composer", line 55, in compose_document
  File "/code/build/docker-compose/out00-PYZ.pyz/yaml.composer", line 84, in compose_node
  File "/code/build/docker-compose/out00-PYZ.pyz/yaml.composer", line 127, in compose_mapping_node
  File "/code/build/docker-compose/out00-PYZ.pyz/yaml.parser", line 98, in check_event
  File "/code/build/docker-compose/out00-PYZ.pyz/yaml.parser", line 439, in parse_block_mapping_key
yaml.parser.ParserError: while parsing a block mapping
  in "./docker-compose.yml", line 1, column 1
expected <block end>, but found '<block mapping start>'
  in "./docker-compose.yml", line 8, column 3
root@kh1:/var/www/rocket.chat#

I tried many thing and yes I rebooted and add the upstart script before rebooting !

Thanks in advance for you help!

x5engine avatar Oct 28 '15 14:10 x5engine

also when it said docker is not installed please use apt-get install docker

I installed it with apt-get install docker and run all of this after it, is it good?

x5engine avatar Oct 28 '15 14:10 x5engine

I have not used docker myself unfortunately but it looks like it is having trouble with your docker-compose.yml, can you add the contents of it to here? Just censor any url's/name/passwords as you deem fit.

emcguinness avatar Oct 28 '15 15:10 emcguinness

@emcguinness - thanks for your help! We've been helping @capensisma on demo.rocket.chat to get the instance going. Closing this ticket.

Sing-Li avatar Oct 28 '15 15:10 Sing-Li

@emcguinness I know it's the yaml syntax but don't know what's wrong with it!

line 1 col 3

    db:
      image: mongo
      volumes:
        - ./data/runtime/db:/data/db
        - ./data/dump:/dump
      command: mongod --smallfiles

    rocketchat:
      image: rocketchat/rocket.chat
      environment:
        - MONGO_URL=mongodb://db:27017/rocketchat
        - ROOT_URL=https://chat.inumio.com
      links:
        - db:db
      ports:
        - 3000:3000

    hubot:
      image: rocketchat/hubot-rocketchat
      environment:
        - ROCKETCHAT_URL=165.114.165.21:3000
        - ROCKETCHAT_ROOM=GENERAL
        - ROCKETCHAT_USER=Botname
        - ROCKETCHAT_PASSWORD=BotPassw0rd
        - BOT_NAME=Botname
        - EXTERNAL_SCRIPTS=hubot-help,hubot-seen,hubot-links,hubot-greetings
      links:
        - rocketchat:rocketchat

x5engine avatar Oct 28 '15 16:10 x5engine

Okay found the solution:

It was an indentation problem :)

db should be the same level as the others...

x5engine avatar Oct 28 '15 21:10 x5engine

jesus that really is it. so sad.

imorti avatar Feb 11 '16 18:02 imorti

Had the same issue (a little space char at start of one line) and yes, it is sad...though it is mentioned in the YAML specs - section 6.1 see- http://www.yaml.org/spec/1.2/spec.html#id2777534 Bit of light reading for y'all!

Bazmcl avatar Dec 13 '16 13:12 Bazmcl

My error pointed to docker-compose.yaml at line 3 which read services: while the error was docker-compose.override.yaml, line 1 where I mistakenly added two spaces before version: '2.1'

SalathielGenese avatar Oct 26 '18 03:10 SalathielGenese

Okay found the solution:

It was an indentation problem :)

db should be the same level as the others...

thanks i have the same problem and i really helped

ahmadnadzirr avatar Apr 12 '19 10:04 ahmadnadzirr