I would like to use PlanetScale with my App Platform app, how can I configure it to use the proxy that is required?
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.
Click below to sign up and get $200 of credit to try our products over 60 days!
Please, do NOT follow the answer from Jon Friesen anymore. It was probably written before PlanetScale implement its connection strings feature.
MYSQL_ATTR_SSL_CAenv variable also with the value
You can also find more details here
Great question! Since PlanetScale has a neat client that creates a proxy to the database instance, we will have to install and authenticate that tool so that it can inject a
DATABASE_URLenvironment variable into the app.
Don’t forget to set the required PlanetScale environment variables from the tutorial!
And that’s it! PlanetScale connections in App Platform! If you want to support PlanetScale with an a dockerfile based app add the install command above prefixed with
RUNto your dockerfile, for example:
Don’t forget to ensure your run command is wrapped in the
pscale connect...command :)
Here’s an example app spec: