nystudio107 / craft

nystudio107 Craft 3 CMS scaffolding project
BSD Zero Clause License
291 stars 85 forks source link

Docker container names still use underscore; `up` conditional always fails #72

Closed ryanirelan closed 2 years ago

ryanirelan commented 2 years ago

Describe the bug

After the change to the Makefile to use hyphens in the container names instead of underscores, the conditional in theup command in the make file always evaluates false. The result is running something like make craft migrate/up shuts down the existing containers and spins up new ones.

I'm only working in the craft-vite branch currently. I haven't tested in other branches.

To reproduce

Steps to reproduce the behavior:

  1. Create a new Craft project per the README instructions.
  2. With the containers runnings, open a new terminal window and run make craft
  3. See that the conditional evaluates to false and new containers spin up.

Expected behavior

I expect that the conditional would find the containers that are already running and run the craft command against them.

Screenshots

Screen Shot 2021-11-10 at 8 47 43 AM Screen Shot 2021-11-10 at 8 50 00 AM

Versions

khalwat commented 2 years ago

It looks like they changed it back, which is... annoying to say the least :)

khalwat commented 2 years ago

So this ends up being that they initially switched it to use the Docker Compose v2 (which uses -'s) and then switched _back_ to Docker Compose v1 (which uses_'s).

But it's now a preference in Docker desktop to turn on Docker Composer v2. So this can be fixed with a Docker preference setting:

pgunC

Enable: Use Docker Compose V2 -- more here: https://docs.docker.com/compose/cli-command/