Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DevEx: add fix for docker compose invocation #5609

Conversation

JayFlexy
Copy link
Contributor

creates compatibility for docker compose or docker-compose

creates compatibility for docker compose or docker-compose
Copy link
Contributor

@Mwindo Mwindo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @pixiwyn mentioned in standup, we do have a change to use podman on the way ... but I think I prefer your version here which is more agnostic. Curious to hear other thoughts though. Thanks, @JayFlexy!

Comment on lines +5 to +9
if command -v docker-compose &> /dev/null; then
DOCKER_COMPOSE="docker-compose"
else
DOCKER_COMPOSE="docker compose"
fi
Copy link
Contributor

@En-8 En-8 Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some possibly-breaking changes between docker-compose and docker compose regarding container names:

Compose generates container names based on the project name, service name, and scale/replica count. In Compose V1, an underscore (_) was used as the word separator. In Compose V2, a hyphen (-) is used as the word separator.

I am not sure if this makes a huge difference for our local development environment, but something still to be mindful of.

Link for reference: https://docs.docker.com/compose/releases/migrate/

@jimlerza
Copy link
Collaborator

jimlerza commented Dec 3, 2024

As @pixiwyn mentioned in standup, we do have a change to use podman on the way ... but I think I prefer your version here which is more agnostic. Curious to hear other thoughts though. Thanks, @JayFlexy!

While I am all for enabling and embracing choice for manual workflows, I think the app's build toolchain should be standardized so we can eliminate discrepancies at compilation and runtime. In theory this can reduce instances of "why does this work for me and not for you?" frustration.

That said, I dunno...how a developer runs the app locally feels like a pretty personal thing. If this were anywhere other than run-local.sh this would be an easier call.

@JayFlexy
Copy link
Contributor Author

JayFlexy commented Dec 3, 2024

As @pixiwyn mentioned in standup, we do have a change to use podman on the way ... but I think I prefer your version here which is more agnostic. Curious to hear other thoughts though. Thanks, @JayFlexy!

While I am all for enabling and embracing choice for manual workflows, I think the app's build toolchain should be standardized so we can eliminate discrepancies at compilation and runtime. In theory this can reduce instances of "why does this work for me and not for you?" frustration.

That said, I dunno...how a developer runs the app locally feels like a pretty personal thing. If this were anywhere other than run-local.sh this would be an easier call.

Should we discuss in parking lot? I would like to hear more on this

@jimlerza jimlerza merged commit cad9133 into ustaxcourt:staging Dec 3, 2024
44 checks passed
@jimlerza jimlerza deleted the devex-update-run-local-for-docker-compose branch December 3, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants