I try to deploy the repo: Perceptively/employer-survey_website
which has this .do/app.yaml:
databases:
- engine: MYSQL
name: MYDB
num_nodes: 1
production: true
cluster_name: MY_CLUSTER
instance_size_slug: professional-xs
name: my_backend
services:
- environment_slug: python
github:
branch: mybranch
deploy_on_push: true
repo: company/website
name: my_backend
but I never get the option for MySQL, only Postgres. Why can’t I use MySQL with app platform?
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!
App Platform supports PostgreSQL, MySQL, and Redis Managed Databases. Some repos have an app spec at .do/app.yaml however that is not used by App Platform at all - it’s mostly a convention to store the app spec at that path so that others can find it easily.
You can add the database from the control panel by browsing to your App -> Components -> Add Database and then select your MySQL database.
Alternatively, you can edit your App Spec directly and use the doctl CLI tool to apply the changes to your app. Also, in spec you posted, num_nodes has been deprecated and instance_size_slug should be a property of the service component like so:
databases:
- engine: MYSQL
name: MYDB
production: true
cluster_name: MY_CLUSTER
name: my_backend
services:
- environment_slug: python
github:
branch: mybranch
deploy_on_push: true
repo: company/website
name: my_backend
instance_size_slug: professional-xs
If you do not have doctl installed, you can follow these instructions.
To create a new app from the spec, run doctl apps create --spec app.yaml.
If you have an existing app that you want to edit:
doctl apps listdoctl apps spec get APP-UUID > app.yamlapp.yaml in a text editor and add the database.doctl apps update --spec app.yaml APP-UUID. This will kick off a new deployment.See the App Specification Reference for more info about app specs.
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.