-
Notifications
You must be signed in to change notification settings - Fork 424
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
Do we still need to define *-job
services in docker-compose?
#642
Comments
I had a closer look at this issue today. Here's my braindump. Tl;dr: there really is nothing we can do about this issue, so let's close it. replacing jobs by exec: ❌It appears that we cannot substitute jobs by rename job resources: ❌So, we need to preserve Kubernetes job resources. We could definitely rename them and get rid of the "-job" suffix. But we would not be able to do the same for docker-compose job services. That's because such jobs would then have the same name as app services. They would then override other service declarations, and that would be very confusing. get rid of job services in docker-compose only: ❌We could just get rid of "*-job" services in docker-compose. Jobs would be executed as "run" commands with existing service declarations. But that would introduce a (potentially important) difference with Kubernetes. So that's probably not a good idea. rename jobs for clarification: ❌It's a little weird that jobs are added to the CLI_DO_INIT_TASKS filter without the "-job" suffix. On the other hand, if it was optional to add the "-job" suffix, then users would be allowed to create job services without the suffix. This would be confusing (see above). We could be explicit about it, and force the "-job" suffix if it is not present. But this would not resolve any actual issue, and it would be even more confusing to explain to users. |
It seems to me that we could simply
docker-compose run service sh -e -c "command"
. Why do we have to rely on a convoluted job architecture?RUN_MYSQL=false
) then we can add it todocker-compose.jobs.yml
, but that should not be the case for most services.run
bypass therestart-policy
, which is good for jobs (we don't want to restart jobs).k8s exec
(here) because this caused us to bypass environment variables set by the Docker entrypoint. But since we no longer define env variables in the entrypoint, can we doexec
again?Such a change would considerably simplify the project architecture.
The text was updated successfully, but these errors were encountered: