By swillison
I’d like to configure a build command for my Python application using configuration in my GitHub repository.
(I don’t want to use the UI for this because I want to create a template repository that other people can easily fork and alter for their own projects)
Is there a way of doing this directly using a file in the repo? I tried adding a release: block to my Procfile but that didn’t seem to work.
I know you can copy the App Spec into a .do/ directory in the repository but that’s no good for creating a template, because it bakes in details that are unique to your app (the GitHub repo and the app name).
I’d like an easy mechanism in my GitHub repository to say “run this build script” which will keep working if other people create copies of my repos and adapt them for their own projects.
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!
Hi @swillison, you were actually on the right path with the Procfile! You can achieve this by setting a web command in the Procfile like so:
web: python myapp.py
As a note, if you set a custom run command in your app spec (or through the web UI), it will override the one set in the Procfile.
I wrote up detailed notes on what I’ve figured out so far here: https://til.simonwillison.net/til/til/digitalocean_datasette-on-digitalocean-app-platform.md
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.