How to run Aidbox in GCP Cloud Run
Last updated
Was this helpful?
Last updated
Was this helpful?
Run the Aidbox container in the GCP environment using as a database.
You must have an active Google Cloud account. More information .
Log in to Google Cloud Console, go to SQL Service, and create a new Cloud SQL instance.
Choose PostgreSQL for the database engine
Choose Enterprise Cloud SQL Edition and "Sandbox" edition preset
Enter the required parameters.
5. Configure the private IP access to the database instance.
In the "Customize your Instance -> Connections" section, enable the "Private IP" option and disable the "Public IP" option.
6. Click the "Create Instance" button and wait until the instance is created.
Open Cloud SQL Studio.
Connect to the postgres database with the username postgres and the password you've chosen when you created the database.
Create the database and user for the Aidbox. Run the following statements one by one in Cloud SQL Studio Editor
Connect to the database aidbox
, that you've created using user postgres, and create the extension.
Navigate to the "Cloud Run" section in the Google Cloud Console and create a new service from the container .
Enter healthsamurai/aidboxone:edge
as a container image URL and add a service name.
Disable authentication.
Set Auto scaling to 1 and leave other properties by default.
Configure Memory and CPU Limits
In the container properties, add environment variables.
Add the following environment variables:
At the Networking tab, configure the outbound traffic to go to the default subnet.
Click the "Create" button and wait for the service to deploy successfully.
Access the service via the URL.
See more about different options for running Aidbox:
During initialization, Aidbox creates certain database extensions. You can find more details . If you prefer not to grant the Aidbox user the permissions required for this, you can pre-create the necessary extensions using a privileged user and disable automatic extension creation via . This is the approach we follow in the current tutorial.
See more about recommended Aidbox environment variables .
the Aidbox instance.