Skip to content

PoiBlackTea/cloudrun-wordpress

Repository files navigation

Prerequisites

Ensure you have Python 3 and the Pulumi CLI.

We will be deploying to Google Cloud Platform (GCP), so you will need an account. If you don't have an account, sign up for free here. In either case, follow the instructions here to connect Pulumi to your GCP account.

This example assumes that you have GCP's gcloud CLI on your path. This is installed as part of the GCP SDK.

Wordpress image base on bitnami wordpress-nginx

Running the Example

After cloning this repo, cd into it and run these commands.

  1. Setup instructions

    Setup instructions

    gcloud auth configure-docker \
        us-central1-docker.pkg.dev
    
  2. Create a new stack, which is an isolated deployment target for this example:

    $ pulumi stack init dev
  3. Set the required configuration variables for this program:

    $ pulumi config set gcp:project <your-gcp-project>
    $ pulumi config set gcp:region <gcp-region>
    # Cloud SQL Disk
    $ pulumi config set wordpress:disk_size <disk size>
    # Cloud SQL instance type
    $ pulumi config set wordpress:tier <cloud sql instance tier>
    # Cloud SQL User for wordpress
    $ pulumi config set wordpress:user <user>
    # Cloud SQL Database for wordpress
    $ pulumi config set wordpress:db <db>
    # Cloud SQL password for wordpress
    $ pulumi config set --secret wordpress:dbPassword [your-database-password-here]
    # bitnami wordpress version
    $ pulumi config set wordpress:tag <tag>

    cloud sql instance type ref: instance type

  4. Deploy everything with the pulumi up command.

    $ pulumi up

Note: you must disable deletion protection before removing the resource (e.g., via pulumi destroy), or the instance cannot be deleted and the provider run will not complete successfully.

About

For Wordpress on GCP Cloud Run with NFS (GCE)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published