By Wilson29thID
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?
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!
Accepted Answer
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:
Dockerfile to something else so it’s not auto-detected (admittedly not ideal), ordoctl 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!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.