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!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Hi @SmallAquaMantaRay
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 andinstance_size_slug
should be a property of the service component like so: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 list
doctl apps spec get APP-UUID > app.yaml
app.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.