Please help me install production instance, im stuck

Im watching the deploy online production video but im stuck at the part where i need to run docker-compose up -d command inside the corteza-production directory.

I have already created nginx directory and was successfull running the docker-compose up -d

This is the error i get:

[opc@free-docker-runner corteza-production]$ docker-compose up -d
ERROR: The Compose file './docker-compose.yaml' is invalid because:
services.server.environment.networks contains ["internal"], which is an invalid type, it should be a string, number, or a null

This is my docker-compose.yaml
any help would be really appreciated please

version: '3.5'

    image: cortezaproject/corteza:${VERSION}
    networks: [ proxy, internal ]
    restart: always
    env_file: [ .env ]
    depends_on: [ db ]
    volumes: [ "./data/server:/data" ]
      # VIRTUAL_HOST helps NginX proxy route traffic for specific virtual host to
      # this container
      # This value is also picked up by initial boot auto-configuration procedure
      # If this is changed, make sure you change settings accordingly
      # This is needed only if you are using NginX Lets-Encrypt companion
      # (see for details)

      # PostgreSQL Database
      # See for details
      image: postgres:13
      networks: [ internal ]
      restart: always
      healthcheck: { test: ["CMD-SHELL", "pg_isready -U corteza"], interval: 10s, timeout: 5s, retries: 5 }
        # Warning: these are values that are only used on 1st start
        #          if you want to change it later, you need to do that
        #          manually inside db container
        POSTGRES_USER:     corteza
        POSTGRES_PASSWORD: corteza

     internal: {}
     proxy: { external: true }

Can someone please help me

@Rich3art To me it seems the issue is in file indentation; can you try fixing it up and see what happens?
Namely, db: is indented under environment under server, which would make the error message you’re getting reasonable.

Hi Tjerman,

Thank you for response.

Can i just ask which system do you have and what command line terminal do you use?

Because i have windows 10 and I’ve tried normal cmd prompt, Gitbash and Visual studio and every time i enter the “vi docker-compose.yaml” commang and click “i” to insert paste the code copied from the docker-compose.yaml section on corteza it then indents all the lines and comments out some lines that is not even having a comment in the code copied, so i then have to manually delete the “#” to change it not to be a comment.

Am i copying and pasting it wrong or is the terminal I’m using wrong?

Kind Regards

If you’re struggling with the CLI, you can use some text editor for this (notepad is also fine).
Just manually open the docker-compose.yaml in the text editor and go from there.

But to answer your question, I am on zsh on Ubuntu. It sometimes does what you’ve mentioned but quickly fixing it up isn’t an issue for me.

1 Like