Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kmturley/appengine-wordpress-angular-universal
Example project showing Wordpress running on AppEngine with Angular Universal
https://github.com/kmturley/appengine-wordpress-angular-universal
Last synced: about 2 months ago
JSON representation
Example project showing Wordpress running on AppEngine with Angular Universal
- Host: GitHub
- URL: https://github.com/kmturley/appengine-wordpress-angular-universal
- Owner: kmturley
- Created: 2019-06-20T21:41:34.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-30T18:59:05.000Z (over 3 years ago)
- Last Synced: 2024-05-02T00:59:43.054Z (8 months ago)
- Language: TypeScript
- Homepage: https://wordpress-angular-universal.appspot.com
- Size: 379 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# appengine-wordpress-angular-universal
Example Wordpress project using:
* AppEngine Standard
* Angular 8.x
* Docker 18.x
* Wordpress 5.x
* MySQL 5.7## Installation
If you need to use an existing database, place it at:
backend/backup.sql
Start by running the docker container locally:
docker-compose up
Then go to the admin to continue installation at:
http://localhost:8080/
Enable permalinks by going to:
http://localhost:8080/wp-admin/options-permalink.php
Setting Custom Structure to be:
/%category%/%postname%/
Setting Category Base to be:
.
## Usage
View the Angular frontend at:
http://localhost:4200/
And use the Wordpress API at:
http://localhost:8080/wp-json/wp/v2/posts
## Database creation
Enable the SQL API at:
https://console.cloud.google.com/flows/enableapi?apiid=sqladmin
Then create the database using the commands:
gcloud sql instances create wordpress --activation-policy=ALWAYS --tier=db-n1-standard-1
gcloud sql databases create wordpress --instance wordpress
gcloud sql users set-password root --host=% --instance wordpress --password=X## Automatic Deployment
Go to Google Cloud Build:
https://console.cloud.google.com/cloud-build/triggers
Click 'Add Trigger' and name it 'Backend'. Then set Cloud Build configuration file location:
/backend/cloudbuild.yaml
Click 'Add Trigger' and name it 'Frontend'. Then set Cloud Build configuration file location:
/frontend/cloudbuild.yaml
## Manual Deployment
Ensure you have just backend and mysql running:
docker-compose stop
docker-compose up backend dbIn a second terminal window, generate a static build:
cd frontend
gcloud init
npm install
npm run build:prerender
npm run deploy## Exporting the database
Export database to local:
docker-compose exec db /usr/bin/mysqldump -u root --password=examplepass --databases exampledb > backend/backup.sql
## Directory structure
/backend --> Backend source files
/frontend --> Frontend sources files## Contact
For more information please contact kmturley