I have a monorepo, which has 2 directories for each project. Now, they have their own Dockerfiles (so bot/Dockerfile
and api/Dockerfile
), and I would like DigitalOcean to build using the relevant dockerfile, so if I have 1 app called tags-api
, it will use api/Dockerfile
to build, and vice versa for bot.
Now my question is, how do I do so? Since currently it just checks for ./Dockerfile
, which, in this case doesn’t exist.
Alternatively, could it possibly use my docker-compose file? I have a ./docker-compose.yaml
file but I couldn’t find an option where I could use compose instead of Docker.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi there,
You should be able to use the
dockerfile_path
directive in your App Spec definition. The path to the Dockerfile is relative to the root of your repo. If set, it will be used to build this component. Here is an example:There is no need to use
docker-compose
you would just have to define all of your services in your app spec file as separate components instead.Here is a reference to the documentation that might be helpful as well:
Let me know how it goes!
Best,
Bobby