Updating Cloud Run Variables - dteck/Mediawiki-GCP-CR GitHub Wiki
Getting Started
We are almost done. This last step is to update some of the environmental Variables we used when setting up our Cloud run instance.
Navigate to Cloud SQL
On the top left of the screen there are three horizontal white lines. This is generally known as a "Hamburger" menu. Clicking on this will fly out a list of Google Cloud Resources that you can set up inside of your project. To start we will want to set up a SQL server. So we need to scroll down this list until we find the “Databases” section and the item “SQL”.
Getting URL and Editing Deployment
On the overview page for your Cloud Run Instance you will be shown the URL that leads to your service. You will want to copy this address so that we can use it to update one of our environmental variables. Above the URL you will see a menu item to Edit and Deploy a new Revision You will want to click on this.
Editing Variables
From the menu you want to select the Environmental Variable Tab. This will take you to the page where you are able to edit the values of the variables exposed to our container.
- FQDN: Here you want to set the value to the URL you copied from the previous step. This will allow the wiki to know how to direct traffic to itself.
- DBHOST: This is where we will set the location of a Unix Socket that connects our container to our database. Using both the MediaWiki and the Google Cloud requirements it will need to be in the form of "localhost:/cloudsql/[Cloud SQL Connection Name]" you can find this connection name on your Cloud SQL overview page
- DBNAME: This is the name of our database inside of Cloud SQL. The default name we chose was "my_wiki"
- DBPREFIX: This is the prefix to our table names we entered during set up if applicable. otherwise leave it blank
- DBUSER: Username used to access your Cloud SQL database
- DBPASS: Password used to access your Cloud SQL database
- CONFIGBUCKET: Name of the storage bucket holding the configuration files
- IMAGEBUCKET: Name of the storage bucket to hold uploaded images and files
Deploying
Checking on the updated status
Congratulations
This should complete your set up. From here on it is up to you to administer your wiki and start filling it in with information.