wordup-cli icon indicating copy to clipboard operation
wordup-cli copied to clipboard

The Compose file...is invalid because...

Open davidshq opened this issue 5 years ago • 10 comments

Tried to run:

wordup wpcli plugin install cmb2

Received the following response

--- Currently running wordup projects: liquid-messages ---

Run command: wp plugin install cmb2 The Compose file 'C:\Users\david\AppData\Roaming\npm\node_modules\wordup-cli\docker\docker-compose.yml' is invalid because: services.mail.ports contains an invalid type, it should be a number, or an object services.wordpress.ports contains an invalid type, it should be a number, or an object

davidshq avatar Aug 26 '19 20:08 davidshq

Did you update wordup-cli from 0.7.2 to 0.7.3 ? It could be that this upgrade breaks the current installations, because the docker-compose version changed.

shry avatar Aug 26 '19 22:08 shry

I did upgrade to 0.7.3 - I'm guessing that is the problem.

davidshq avatar Aug 27 '19 19:08 davidshq

I'm pretty sure if you run wordup stop --delete (Please keep in mind that the WordPress installation with created posts etc. will be deleted) and afterwards wordup install it will fix the problem. Because the wordup-cli is still in beta, it can happen that sometimes things break after an update, sorry for the inconvenience.

shry avatar Aug 27 '19 22:08 shry

Hmmm...I'm still running into the same problem, but now also another one, I'll put in a ticket for it separately, as it is separate but I think probably should be resolved before this one...more to come.

davidshq avatar Aug 28 '19 19:08 davidshq

Thank you. I guess the issue could be platform related (Windows only). The ENV variable of the ports seems to make some problems. Could you lookup in the wordup config.json file if the listeningOnPort variable is set correctly?

shry avatar Aug 28 '19 20:08 shry

I investigated this issue, and i came to the conclusion that the downgrade of the docker-compose version in 0.7.3 is not compatible with Windows. If you change the version (at the beginning of the file) in 'C:\Users\david\AppData\Roaming\npm\node_modules\wordup-cli\docker\docker-compose.yml' back to 3.7, does it work again?

shry avatar Aug 30 '19 13:08 shry

Hi, I was having the same issue and I "solved" it by hardcoding the ports in the docker-compose.yml file. I realize it's not the best solution but is working for my needs though. The version of the docker-compose file is 3.3.

services:
  wordpress:
    ports:
      - "8000:80"
 mail:
    ports:
      - "8025:8025"

ddazal avatar Oct 28 '19 01:10 ddazal

Hi, I was having the same issue and I "solved" it by hardcoding the ports in the docker-compose.yml file. I realize it's not the best solution but is working for my needs though. The version of the docker-compose file is 3.3.

services:
  wordpress:
    ports:
      - "8000:80"
 mail:
    ports:
      - "8025:8025"

Thank you for your help. Have you tried also my idea of changing the docker-compose version to 3.7? Like i wrote in: https://github.com/wordup-dev/wordup-cli/issues/13#issuecomment-526604793
I still think that this causes the bug.

shry avatar Oct 28 '19 21:10 shry

Yes, I tried that with no success. I'm using Ubuntu 16 an the error is the same :(

services.mail.ports contains an invalid type, it should be a number, or an object
services.wordpress.ports contains an invalid type, it should be a number, or an object

ddazal avatar Oct 29 '19 00:10 ddazal

Ok. Thank you. I'm currently rewriting/refactoring a lot of parts of the wordup-cli, perhaps this bug will be fixed afterwards ;)

shry avatar Oct 31 '19 21:10 shry