Deploy PostgreSQL

How to deploy PostgreSQL?

NOTE: Spheron Compute offers the flexibility to create custom configurations for your instance.

Spheron allows you to deploy a compute instance pre-installed with PostgreSQL, all set up and ready to use. To deploy PostgreSQL:

  1. Upon logging in, you'll be directed to the Create Organization page, where you can give your organization name and choose Avatar. Ensure the "Compute" option is selected from the drop-down menu of the "Start With" option. Click 'Continue'.
  2. Next, you'll be taken to a new page. Click the "Create New Projects" button. Add 'Project Title' And 'Project Description' and Click 'Create'.
  3. Choose "Compute" to use CPU-based instances for running containers.
  4. Choose your desired Compute Type option under Compute Type.
  5. Click "Start from Marketplace App" and Select "Postgres" from the marketplace.
  6. When selecting a region, we recommend starting by trying to deploy in a region closer to you. If you encounter any issues, you can consider switching to other regions. Choosing a region closer to you can improve performance and reduce latency. Click here to know more.
  7. Spheron will automatically select the recommended plan for the specific template. If you intend to move forward with the recommended plan, just Click 'Deploy' to initiate deployment.
  8. If you want you can Select the instance plan that suits your needs. You can use the "Create Custom Plan" toggle to create custom plans for your CPU based instance.
  9. You have to choose storage from the available options or the custom storage option that fits your needs. This storage will be volatile and is erased when the instance is restarted, redeployed, or shut down. Additionally, you get the option to choose Persistent Storage.
  10. Next, Add "User","Password" and "Database" under Template Configuration. Spheron has made it easy and auto-filled the configuration options. You can add advanced configurations if required. Click here to know more.
  11. Click "Deploy" to initiate deployment.

NOTE: The default values for User, Password and Database is admin, password and mydb, respectively.

Template Configuration

  • User - The user for accessing the PostgreSQL database.
  • Password - The password associated with the PostgreSQL database.
  • Database - The name for the PostgreSQL database.

Deploy Your Own

Deploy your own PostgreSQL with Spheron:

Deploy with Spheron (opens in a new tab)

Verify Installation

PostgreSQL can be accessed only after the Compute Instance is provisioned. Thus, you need to wait for the installation to complete before you can start using it.

How to connect to PostgreSQL?

You can use the connection string URI to connect to PostgreSQL. The standard URI connection scheme has the following format:

  • postgresql:// - A required prefix to identify that this is a string in the standard connection format.
  • username:password - Authentication credentials passed in App Configuration.
  • host[:port] - The host and port number where the postgresql instance is running. Use the Connection URL provided by Spheron under Port Policy Info.
  • /dbname - The name of the database passed in App Configuration.

Run the following command in your terminal to test your connection:

psql postgresql://[username:password@]host[:port][/dbname]

For more information, refer to the PostgreSQL docs (opens in a new tab).

Deploy RedisDeploy MySQL