Adobe Introduces Powerful Generative AI Tools in Photoshop
Artificial Intelligence

Adobe Introduces Powerful Generative AI Tools in Photoshop Beta

by Veronica
June 1, 2023
2

Adobe Photoshop beta AI will take your creativity to the...

Read more
Adobe Photoshop's Generative Fill Feature

Exploring the Power of Adobe Photoshop’s Generative Fill Feature

June 1, 2023
ChatGPT app

The Easiest Way to Download ChatGPT App Free

June 1, 2023
Nvidia Unveils Futuristic Gaming Experience at Computex 2023

Nvidia Unveils Futuristic Gaming Experience at Computex 2023, Blending Gaming and AI

May 29, 2023
NVIDIA and Microsoft Partner to Accelerate AI

NVIDIA and Microsoft Partner to Accelerate AI

May 25, 2023
DB GPT

DB GPT: A New Tool for Natural Language Processing

May 25, 2023
Midjourney vs DALL-E

Midjourney vs DALL-E: Differences in AI Art Generation Platforms

May 25, 2023
Microsoft Build 2023 Unveiling the Power of AI and Innovation

Microsoft Build 2023: Unveiling the Power of AI and Innovation

May 24, 2023
AutoGPT and ChatGPT

AutoGPT and ChatGPT: Discovering the World of AI Language Models

May 4, 2023
ChatGPT and its ability to generate content

ChatGPT and its ability to generate content and ideas

May 15, 2023
How to install Web LLM

How to Install Web LLM for Your Website

May 10, 2023
Cloudbooklet
  • News
  • Artificial Intelligence
  • Linux
  • Google Cloud
  • AWS
No Result
View All Result
Cloudbooklet
  • News
  • Artificial Intelligence
  • Linux
  • Google Cloud
  • AWS
No Result
View All Result
Cloudbooklet
No Result
View All Result
Home Google Cloud

Docker WordPress Development on Google Cloud with Cloud SQL

by Cloudbooklet
December 21, 2019
in Google Cloud, Compute Engine
Reading Time: 6 mins read
Docker WordPress Development on Google Cloud with Cloud SQL
Share on FacebookShare on TwitterShare on WhatsAppShare on Telegram

Docker WordPress Development on Google Cloud with Cloud SQL. We have covered the details of setting up WP on LEMP stack on Ubuntu 18.04 LTS.

Now, in this tutorial we are going to use EasyEngine to set up WordPress in Docker on Google Cloud and use Cloud SQL for database.

You might also like

How to Setup SSH Keys on Ubuntu

How to Setup SSH Keys on Ubuntu 20.04

May 31, 2023
DragGAN AI editing Tool Install and Use DragGAN Photo Editor

DragGAN AI editing Tool Install and Use DragGAN Photo Editor

May 27, 2023

Prerequisites

Make sure you choose Ubuntu 16.04/18.04 or Debian while setting up your Google Compute Engine.

  1. Up and running Compute Engine, see the Setting up Compute Engine Instance.
  2. Domain name is pointed to your virtual machine.
  3. For setting up Cloud DNS, see the Setting up Google Cloud DNS for your domain.
  4. Google Cloud SQL Setup, see Setup Cloud SQL and connect with Compute Engine.

Install EasyEngine

We shall install EasyEngine with the official installer script for Linux. This script will install all dependencies for you.

Go to your Google Cloud Console and navigate to Compute Engine >> VM Instances and SSH to your instance.

Now execute the following commands to install EE v4.

sudo apt update
wget -qO ee rt.cx/ee4 && sudo bash ee

This will take a few minutes to install and setup docker. Once the installation is complete you will receive a confirmation like this below.

+-------------------+-------------------------------------------------------------------------+
| OS | Linux 4.15.0-1026-gcp #27-Ubuntu SMP Thu Dec 6 18:27:01 UTC 2018 x86_64 |
| Shell | /bin/bash |
| PHP binary | /usr/bin/php7.2 |
| PHP version | 7.2.13-1+ubuntu18.04.1+deb.sury.org+1 |
| php.ini used | /etc/php/7.2/cli/php.ini |
| EE root dir | phar://ee.phar |
| EE vendor dir | phar://ee.phar/vendor |
| EE phar path | /home/username |
| EE packages dir | |
| EE global config | |
| EE project config | |
| EE version | 4.0.8 |
+-------------------+-------------------------------------------------------------------------+

Now you can proceed to create a new site.

Set up WordPress in Docker

There are different types of sites that can be created using EasyEngine

  1. Basic HTML website
  2. PHP website with database
  3. WordPress website (Cache, Non-cache, Sub-domain, Sub-directory)
  4. Multi-site WordPress on Sub-domain or Sub-directory

Now we shall install WP using cache and use Cloud SQL as database.

The command to create a new site is sudo ee site create yourdomainname.com --type=wp

We shall customize the installation with some additional parameters as defined below.

  • dbhost => External database host name
  • dbuser => Database username
  • dbpass => Database password
  • dbname => Database name
  • admin-email => WP admin Email
  • admin-user => WP admin username
  • admin-pass => WP admin password
  • dbprefix => Database prefix
  • cache => Enable Redis cache
  • ssl => Install SSL certificate

Now execute the following command to create your WordPress website.

sudo ee site create yourdomainname.com --type=wp --dbhost=CLOUD_SQL_INSTANCE_IP_ADDRESS --dbuser=database_username --dbpass=database_password --dbname=database_name --admin-email=your_email --admin-user=admin_username --admin-pass=admin_password --dbprefix=db_prefix_ --cache

Now you have instructed EasyEngine to create a WP website for your Domain name with Redis cache, Cloud SQL for database and custom login credentials.

Within a few seconds your website will be created with the above details and once the set up is completed you will receive your site details like this.

Configuring project.
Verifying connection to remote database
Success: Connection to remote db verified
Creating WordPress site yourdomainname.com
Copying configuration files.
Starting site's services.
Downloading and configuring WordPress.
+--------------------+------------------------------------------+
| Site | https://yourdomainname.com |
+--------------------+------------------------------------------+
| Site Root | /opt/easyengine/sites/yourdomainname.com |
+--------------------+------------------------------------------+
| Site Title | yourdomainname.com |
+--------------------+------------------------------------------+
| WordPress Username | WordPress Username |
+--------------------+------------------------------------------+
| WordPress Password | WordPress Password |
+--------------------+------------------------------------------+
| DB Host | CLOUD_SQL_INSTANCE_IP_ADDRESS |
+--------------------+------------------------------------------+
| DB Name | Database Name |
+--------------------+------------------------------------------+
| DB User | Database Username |
+--------------------+------------------------------------------+
| DB Password | Database Password |
+--------------------+------------------------------------------+
| E-Mail | Admin Email |
+--------------------+------------------------------------------+
| SSL | Enabled |
+--------------------+------------------------------------------+
| SSL Wildcard | No |
+--------------------+------------------------------------------+
| Cache | Enabled |
+--------------------+------------------------------------------+

Now visit your Domain name in your browser, you can see your website homepage.

Great!

Docker WordPress HomePage

Let’s check the admin to verify what is used.

Login to your dashboard with your admin username and password. If you don’t remember the password you can always get your site info.

sudo ee site info yourdomainname.com
WordPress Docker Admin settings

As you can see Nginx Helper and WP Redis plugins are activated by default in your installation.

Install SSL Certificate in Docker

Now you can install Let’sEncrypt SSL certificate using EE v4.

sudo ee site update yourdomainname.com --ssl=le

Once this is completed your site will be accessible with HTTPS.

Docker Processes

You can check also the running services inside containers using sudo docker ps

CONTAINER ID        IMAGE                           COMMAND                  CREATED             STATUS              PORTS                                      NAMES
a0420958d5a4 easyengine/nginx:v4.0.0 "/usr/bin/openresty …" 11 minutes ago Up 11 minutes 80/tcp yourdomainnamecom_nginx_1
22f902aa48d4 easyengine/cron:v4.0.0 "/usr/bin/ofelia dae…" 18 minutes ago Up 18 minutes ee-cron-scheduler
1ed9c3d38a85 easyengine/postfix:v4.0.0 "postfix start-fg" 24 minutes ago Up 23 minutes 25/tcp yourdomainnamecom_postfix_1
b61074c1703a easyengine/php:v4.0.0 "docker-entrypoint.s…" 24 minutes ago Up 24 minutes 9000/tcp yourdomainnamecom_php_1
556f452292ac easyengine/redis:v4.0.0 "docker-entrypoint.s…" 25 minutes ago Up 24 minutes 6379/tcp services_global-redis_1
c7933827d685 easyengine/nginx-proxy:v4.0.1 "/app/docker-entrypo…" 35 minutes ago Up 35 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp services_global-nginx-proxy_1

You can see PHP, Redis, Nginx are running inside docker.

You can also check the docker status for memory, cpu and I/O usage.

sudo docker stats
CONTAINER ID        NAME                             CPU %               MEM USAGE / LIMIT        MEM %               NET I/O             BLOCK I/O           PIDS
a0420958d5a4 yourdomainnamecom_nginx_1 0.00% 4.113MiB / 1.65GiB 0.24% 5.17kB / 42B 9.89MB / 0B 2
22f902aa48d4 ee-cron-scheduler 0.79% 6.832MiB / 1.65GiB 0.40% 1.87kB / 0B 7.54MB / 0B 7
1ed9c3d38a85 yourdomainnamecom_postfix_1 0.00% 5.027MiB / 1.65GiB 0.30% 2.7kB / 2.68kB 11.8MB / 4.1kB 4
b61074c1703a yourdomainnamecom_php_1 0.01% 10.44MiB / 1.65GiB 0.62% 27.5kB / 67.9kB 59.8MB / 0B 1
556f452292ac services_global-redis_1 0.15% 1.902MiB / 1.65GiB 0.11% 64.3kB / 2.83kB 7.04MB / 0B 4

Now your WordPress installed with Docker containers. To learn more abour EE you can get more details by checking their handbook.

Running WordPress inside the Docker is easy now!

Tags: Compute EngineDockerGoogle Cloud PlatformUbuntu 18.04WordPress
ShareTweetSendShare
Cloudbooklet

Cloudbooklet

Help us grow and support our blog! Your contribution can make a real difference in providing valuable content to our readers. Join us in our journey by supporting our blog today!
Buy me a Coffee

Related Posts

Set Up Deep Learning with Nvidia, Cuda, cuDNN on Ubuntu

How to Set Up Deep Learning with Nvidia, CUDA, cuDNN on Ubuntu 22.04

May 27, 2023
How to Install or Upgrade PHP 8.2 on Ubuntu 22.04

How to Install or Upgrade PHP 8.2 on Ubuntu 22.04

June 1, 2023
How to Change Timezone on Ubuntu 22.04

How to Change Timezone on Ubuntu 22.04

May 16, 2023
How to Install Ansible on Ubuntu 22.04

How to Install Ansible on Ubuntu 22.04

May 19, 2023

Comments 3

  1. Artem Kishar says:
    3 years ago

    Hi,

    I get an error message “Error: Cannot create/start proxy container. Please make sure port 80 and 443 are free. ”

    Can you help me?

    Reply
  2. Robert says:
    4 years ago

    Hi

    Can I run Cyberpenl instead with the same structure, right? I really enjoy your tutorial. They are so thorough and clear and would like to see your new post regarding of LiteSpeed server. Thank you.

    Reply
    • Cloudbooklet says:
      4 years ago

      Thank you so much for your interest in this article

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

I agree to the Terms & Conditions and Privacy Policy.

  • Trending
  • Comments
  • Latest
DragGAN The AI-Powered Image Editing Tool

DragGAN: The AI-Powered Image Editing Tool That Makes Editing Images Easy

May 30, 2023
DragGAN AI editing Tool Install and Use DragGAN Photo Editor

DragGAN AI editing Tool Install and Use DragGAN Photo Editor

May 27, 2023
Bard API key

Everything You Need to Know About Google’s Bard API Key

May 20, 2023
Install PHP 8.1 on Ubuntu

How to Install or Upgrade PHP 8.1 on Ubuntu 20.04

May 17, 2023
DragGAN The AI-Powered Image Editing Tool

DragGAN: The AI-Powered Image Editing Tool That Makes Editing Images Easy

79
Upgrade PHP version to PHP 7.4 on Ubuntu

Upgrade PHP version to PHP 7.4 on Ubuntu

28
Install Odoo 13 on Ubuntu 18.04 with Nginx - Google Cloud

Install Odoo 13 on Ubuntu 18.04 with Nginx – Google Cloud

25
Best Performance WordPress with Google Cloud CDN and Load Balancing

Best Performance WordPress with Google Cloud CDN and Load Balancing

23
Best PHP-FPM Configuration - Easy and Simple Calculation

Best PHP-FPM Configuration – Easy and Simple Calculation

June 1, 2023
ChatGPT Shared Links

ChatGPT Shared Links: A New Way to Share Your Conversations

June 1, 2023
Deepfake

Deepfake: The Rise of Synthetic Media

June 1, 2023
How to Setup SSH Keys on Ubuntu

How to Setup SSH Keys on Ubuntu 20.04

May 31, 2023

Popular Articles

  • DragGAN The AI-Powered Image Editing Tool

    DragGAN: The AI-Powered Image Editing Tool That Makes Editing Images Easy

    1514 shares
    Share 606 Tweet 379
  • DragGAN AI editing Tool Install and Use DragGAN Photo Editor

    396 shares
    Share 158 Tweet 99
  • Auto-Photoshop-Stable Diffusion-Plugin: A New Way to Create AI-Generated Images in Photoshop

    71 shares
    Share 28 Tweet 18
  • InternGPT: A New Way to Interact with ChatGPT

    56 shares
    Share 22 Tweet 14
  • Microsoft research Reveals GPT-4 AI Shows Promising Signs of Common Sense and Human-Like Reasoning

    99 shares
    Share 40 Tweet 25
Latest Technology Trends in Artificial Intelligence and Machine Learning with Cloudbooklet

Welcome to our technology blog, where we explore the latest advancements in the field of artificial intelligence (AI) and how they are revolutionizing cloud computing. In this blog, we dive into the powerful capabilities of cloud platforms like Google Cloud Platform (GCP), Amazon Web Services (AWS), and Microsoft Azure, and how they are accelerating the adoption and deployment of AI solutions across various industries. Join us on this exciting journey as we explore the endless possibilities of AI and cloud computing.

  • About
  • Contact
  • Disclaimer
  • Privacy Policy

Cloudbooklet © 2023 All rights reserved.

No Result
View All Result
  • News
  • Artificial Intelligence
  • Linux
  • Google Cloud
  • AWS

Cloudbooklet © 2023 All rights reserved.

This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.