I’m excited to try out the new App platform. I’ve been asking Santa for something like this from DO for years.

I’ve got a rails app that happens to have a Dockerfile in the repo. I would expect this to be deployed with the rails bootpack, but when I try to setup the app, it says “Dockerfile detected” and tries to deploy it as a docker app. How do I deploy it as a rails app/buildpack?

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.

×
1 answer

@Wilson29thID 👋

Thanks for trying out the App Platform! You’re right that currently if you create an app through the UI, and your repo contains a Dockerfile at the root, then we’ll automatically use that instead of the Ruby/Rails buildpack.

You have a couple options:

  1. Rename your Dockerfile to something else so it’s not auto-detected (admittedly not ideal), or
  2. Use doctl directly with a custom app spec that doesn’t include a dockerfile_path (which is what the UI is injecting).

If you go with option (2), your custom app spec might look something like this initially:

name: sample-rails
services:
- name: web
  github:
    repo: digitalocean/sample-rails
    branch: main
    deploy_on_push: true
  environment_slug: ruby-on-rails

And may evolve into something more complex over time like this sample.

We definitely appreciate your feedback on this, and will consider providing a way to avoid the auto Dockerfile detection in the UI.

Happy coding!

Submit an Answer