Google Cloud Platform
Deploying OWOX Data Marts on Google Cloud Platform (GCP) relies on two managed services:
- Cloud SQL for MySQL – hosts the application database with minimal operational overhead.
- Cloud Run – provides a serverless runtime for the application container.
The sections below walk through provisioning these services, configuring application secrets, and performing the first admin sign-in.
1. Create the Cloud SQL Instance
Section titled “1. Create the Cloud SQL Instance”- Open the Cloud SQL creation wizard: https://console.cloud.google.com/sql/instances/create;engine=MySQL
- Edition: choose Enterprise (sufficient for most workloads) and start with the Sandbox preset. You can increase resources later.
- Instance info:
- Database version:
MySQL 8.0 - Instance ID:
owox-data-marts-db(or another descriptive name) - Password: Generate a password for the
rootuser and store it securely. The application will not useroot, but you may need it for maintenance.
- Database version:
- Region: pick the same region you plan to use for Cloud Run.
- Machine configuration: start with
General purpose – Shared core–1 vCPU, 1.7 GB RAM. Monitor usage and scale if needed. - Connections: for quick setup, you can allow public access by adding the
0.0.0.0/0network. While this is not the best choice from a security perspective, it can help initial testing; check I acknowledge the risks, then replace the rule with a more restricted network as soon as possible. - Click Create instance. Provisioning can take several minutes; refresh manually if required.
- After creation, note the following from the Connect to this instance section:
- Public IP address (for example
136.113.41.46) - Default TCP port (typically
3306)
- Public IP address (for example
Create the Application Database
Section titled “Create the Application Database”- Within the instance, open the Databases tab.
- Click Create database and set Database name to
owox-data-marts-db - Click Create.
Create the Application User
Section titled “Create the Application User”- Switch to the Users tab and click Add user account.
- Choose Built-in authentication and enter:
- User name:
owox-data-marts-app - Password: generate a strong password and store it securely.
- User name:
- Click Add.
2. Deploy the Cloud Run Service
Section titled “2. Deploy the Cloud Run Service”- Launch the Cloud Run deployment wizard: https://console.cloud.google.com/run/create?enableapi=true&deploymentType=container
- Container image URL:
us-docker.pkg.dev/owox-registry/ghcr/owox/owox-data-marts:latest - Service name: choose a descriptive name, e.g.
owox-data-marts - Region: select the same region as the Cloud SQL instance.
- Copy the generated Endpoint URL and store it; it becomes your
PUBLIC_ORIGIN. - Authentication: select
Allow public access. OWOX Data Marts provides built-in authentication. - Billing: choose
Instance-based. - Service scaling: set to
Manual scalingand keep Number of instances at1. OWOX Data Marts requires at least one instance running continuously to enable scheduled scenarios. - Ingress: set to
All.
Configure Container Settings
Section titled “Configure Container Settings”Under Containers, Volumes, Networking, Security / Containers → Settings:
- Memory:
1GiB - CPU:
1 - Execution environment:
Second generation
Configure Environment Variables
Section titled “Configure Environment Variables”Open Containers, Volumes, Networking, Security / Containers → Variables & Secrets and add the variables below. Replace the placeholder values with the credentials collected in earlier steps:
-
PUBLIC_ORIGIN: use the Cloud Run endpoint from the above, e.g.https://owox-data-marts-312784848198.europe-west1.run.app(ensure there is no trailing slash) -
DB_TYPE:mysql -
DB_HOST: Cloud SQL public IP address generated for Cloud SQL Instance -
DB_PORT: Cloud SQL port (default3306) generated for Cloud SQL Instance -
DB_MYSQL_SSL:{"rejectUnauthorized": false} -
DB_USERNAME:owox-data-marts-app -
DB_PASSWORD: the password generated forowox-data-marts-appApplication User -
DB_DATABASE:owox-data-marts-db -
IDP_PROVIDER:better-auth -
IDP_BETTER_AUTH_SECRET: a unique 32-character secret. Generate one locally, e.g.openssl rand -base64 32. -
IDP_BETTER_AUTH_PRIMARY_ADMIN_EMAIL: the email for the first admin user, e.g.your@company.com. -
LOG_FORMAT:gcp-cloud-logging
🏁 When all variables are in place, click Create and wait for the deployment to finish.
Example environment variables configuration block (do not reuse as-is):
PUBLIC_ORIGIN=https://owox-data-marts-312784848198.europe-west1.run.app
DB_TYPE=mysqlDB_HOST=136.113.41.46DB_PORT=3306DB_USERNAME=owox-data-marts-appDB_PASSWORD=PO$sTNkf?TRoY83gDB_DATABASE=owox-data-marts-dbDB_MYSQL_SSL={"rejectUnauthorized": false}
IDP_PROVIDER=better-authIDP_BETTER_AUTH_SECRET=pw/1VHJStJeLThUeFtHoRlKSdRHHIYKPMnYMSO+86bA=IDP_BETTER_AUTH_PRIMARY_ADMIN_EMAIL=your@company.com
LOG_FORMAT=gcp-cloud-logging3. Create the First Admin User
Section titled “3. Create the First Admin User”- Open the newly created Cloud Run service.
- Navigate to Observability → Logs.
- Search for log entries containing
Primary admin created - Open the matching log line and copy the magic link from
jsonPayload.message. - Follow the link to set a password for the email specified in
IDP_BETTER_AUTH_PRIMARY_ADMIN_EMAIL. - Sign in to OWOX Data Marts with that email and password.
4. Rollout Updates
Section titled “4. Rollout Updates”When a new OWOX Data Marts release is available, or you need to adjust the application configuration:
- Open the Cloud Run service.
- Click Edit & deploy new revision.
- Update the container image to the desired OWOX Data Marts tag (the
latesttag documented above already tracks the newest release) and adjust settings or variables if required. - Click Deploy to roll out the update.