Skip to content

Q42Philips/wp-developer-portal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Wordpress on Google Cloud Run

Build and deploy

gcloud builds submit --tag gcr.io/PROJECT_NAME/IMAGE_NAME // build an image
gcloud run deploy wordpress [--region REGION] --platform managed --image gcr.io/PROJECT_NAME/IMAGE_NAME --set-env-vars DB_NAME=wordpress,DB_USER=root,DB_PASSWORD=mysecretpassword,DB_HOST=database_host --port 80 // deploy to Cloud run

Environment variables and port could be set via Cloud Run interface, or pass it via yaml file as --env-vars-file .env.yaml https://cloud.google.com/functions/docs/env-var

Setup

  • Dockerfile contains oficial PHP image with Apache and configuration for mysql connect and image handling.
  • wp-config.php uses environment variables for database parameters instead of hard-coded values
  • contains WP-Stateless plugin, which allow us to use Google Cloud Storage instead of local storage

About

Develop Portal Wordpress

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 64.1%
  • JavaScript 21.2%
  • CSS 13.5%
  • SCSS 1.2%