![]() ![]() ![]() This redeploys the app with the new environment variables. Once you’ve entered the values for each field, click Save. App Platform provides several bindable environment variables that contain sensitive information about your app and its components. Once the app redeploys, you can define environment variables that your application can use to connect to the database and its pool. App Platform redeploys your app with the attached database. After configuring these settings, click Attach Database. In the User field, select the database user that you want the application to connect to the database with. In the Database field, select the database in the cluster you want the application to connect to. Once you’ve selected the target database, additional dropdown menus appear. On the Configure your database page, select the Previously Created DigitalOcean Database option, then select the database cluster with the connection pool from the Database Cluster dropdown menu. To add the database as a component of your app from the DigitalOcean Control Panel, select Apps from the left-hand menu and then select your app from the Apps screen.įrom the app’s Overview page, click the Create button and select Create/Attach Database from the dropdown menu. Once you have completed these prerequisites, you can add the database as a component of your app. You can create connection pools for your application in App Platform using PostgreSQL and bindable environment variables.īefore adding a PostgreSQL database with a connection pool to your app, you need to complete the following: This helps reduce latency, lower resource usage, and create parallelism in your application. Instead of forcing database clients to open and close connections each time they send a request, you can set up connection pools that allow clients to open a set number of connections, keep them open, and reuse them over the course of their session with the database. Connecting your App Platform app to a database connection pool is currently only available for PostgreSQL databases. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |