Metadrop / drupal-boilerplate

Drupal projects up and running with Docker and many other tools in minutes
28 stars 23 forks source link

Rename compose files to new canonical format #140

Closed omarlopesino closed 6 months ago

omarlopesino commented 6 months ago

More information: https://docs.docker.com/compose/compose-application-model/

omarlopesino commented 6 months ago

I've just checked that if .env contains DOCKER_COMPOSE_CMD defined like this

DOCKER_COMPOSE_CMD=docker compose

It appears the following error:

 Failed to parse dotenv file. Encountered unexpected whitespace

I've tried to fix it by:

  1. Encapsulating DOCKER_COMPOSE_CMD with quotes DOCKER_COMPOSE_CMD=docker compose
  2. Modifying boilerplate assistant command to get the docker compose command: $this->dockerComposeCmd = trim(shell_exec("grep ^DOCKER_COMPOSE_CMD= .env.example | cut -f2 -d= | tr -d '\"'"));

The problem is that the Makefile commands stop working, because they expect DOCKER_COMPOSE_CMD to not be encapsulated. At this point, I don't know exactly how to fix it.

Can we just stop supporting compose V1 as it is deprecated' THat would all the problems by just using docker compose and never docker-compose

rsanzante commented 6 months ago

I agree, we can drop v1.

rsanzante commented 6 months ago

I've dropped support for v2 in the assistant. and now tests are green!