coollabsio / coolify

An open-source & self-hostable Heroku / Netlify / Vercel alternative.
https://coolify.io
Apache License 2.0
26.46k stars 1.34k forks source link

[Improvement]: Allow us to add custom Dockerfiles to docker compose and service deployments #2552

Open ayntk-ai opened 3 weeks ago

ayntk-ai commented 3 weeks ago

Description

At the moment when we want to modife the default docker image bein used in service deplyment or when using a docker compose file we have to build our own image and upload it to docker hub or upload a dockerifle onto the right folder in the server. This all is too complex

Minimal Reproduction (if possible, example repository)

Ther should be a way that we can add a docker compose file with the folwoing information for exmaple:

wordpress:
    build:
      context: .
.............

And then in the deployment tab for all services and all docker compose deployments there is a field where we can add a custom dockerfile -> and also a checkbox we have to check if we want to use the costume dockerfile. Steps to implement:

Exception or Error

No response

Version

-

enesbala5 commented 3 weeks ago

I am using a command like this to build the images:

docker compose --env-file .env --env-file .env.prod -f docker-compose.yaml -f docker-compose.prod.yaml build

I am not sure if it's useful for you until the feature is implemented to the interface.

You can also create a script and call it directly. Like the one below:

cd bin && ./deploy.sh prod build

and

cd bin && ./deploy.sh prod up -d

ayntk-ai commented 3 weeks ago

Same thing the other way around would also be nice: