By elenaRay
Hello everyone, I don’t understand from documentation how to use App Platform with doctl. Specifically, how can I release a deployment with a yaml contained in the repository? I see that there is the following command:
doctl apps create-deployment
But I don’t understand how to connect the yaml file. And in general the auto deploy connected to a branch how do you tell it to use the yaml file present in the repository?
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!
Thanks very much Bojand for your explanation. Last question if I can ask:
I have a Laravel app. In the first deploy, example, I have to launch the following commands:
php artisan migrate php artisan db:seed
In a second release I have the following command:
php artisan optimize
What is the best practice? Update commands in dashboard or other?
Thanks in advance
Hello, sorry if this is misleading help text. A deployment is an instance of an app in time. This is implying that the deployment created will use whatever the current spec of the app is within App Platform. We will try and improve this wording.
The app spec yaml file is used to create an app using doctl CLI.
doctl apps create --spec <path-to-spec>
Alternatively you can create an app using the dashboard by connecting to source control such as GitHub or GitLab.
Regardless of the creation mechanism, once an app is created, you can initiate a new deployment using the command:
doctl apps create-deployment <app id>
You can get app IDs by listing apps:
doctl apps list
You can retrieve the app’s spec using spec command:
doctl apps spec get <app id>
The app spec is only used to create or update an app.
Here are command line documentation
Hope this helps!
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.