Info Security Memo
  • Blog
  • Sitemap
    • Categories
  • Contact
  • About
  • Resources
  • Tools
  • 51sec.org

Build Confidence

Focusing on Information Security 

Info Security Notes

Using Portainer to Create Custom Wordpress Template on Arm64 Based VPS

8/7/2021

0 Comments

 
Using Portainer to Create Custom Wordpress Template on Arm64 Based VPS

 This post is to show the steps how to use Portainer to create a custom template to launch your Wordpress stack if default stack template is not working.




Wordpress Template Error

The default template works well for x86 / x64 architecture. Since I am use Arm64 based VPS to do installation, I am having this error message:

"Deployment error
Status: no matching manifest for linux/arm64/v8 in the manifest list entries, code:1
"

It is because they could not find the arm64 based matching image under that linux repository. What we will need to do to fix this issue is to create a custom template to change image name to right one. 





 







Custom Wordpress Template

Based on mysql/mysql-server's supported tags to show, version 8.0 is supporting arm architecture. (https://ift.tt/3CiO5Vk)

 
Lets change db's image from image: mysql:5.7 to image: mysql/mysql-server:8.0 





version: '2'

services:
   db:
     image: mysql/mysql-server:8.0
     volumes:
       - db_data:/var/lib/mysql
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: ${MYSQL_DATABASE_PASSWORD}
       MYSQL_DATABASE: wordpress
       MYSQL_USER: wordpress
       MYSQL_PASSWORD: wordpress

   wordpress:
     image: wordpress:latest
     ports:
       - 80
     restart: always
     environment:
       WORDPRESS_DB_HOST: db:3306
       WORDPRESS_DB_USER: wordpress
       WORDPRESS_DB_PASSWORD: wordpress

volumes:
    db_data:





Create subdomain for your new Wordpress site

This is a simple step. Based on your domain name registrar, you can find out the management panel to add a new sub domain for your new workdpress site. Here is an example from my Cloudflare page. 




Change Docker Network



Previously, I have create a custom bridge network, which all of my Dockers joined in. 


 
Change Wordpress dockers network to the same network as Nginx.




Nginx Configuration

 

Create Nginx configuration file for Wordpress site:



root@560e40a1e1d2:/etc/nginx/conf.d# cat arm1wp.conf 
server {
    listen       80;
    server_name  arm1wp.51sec.eu.org;

location / {
    proxy_pass       http://mywp_wordpress_1;
    proxy_http_version         1.1;
    proxy_read_timeout 300;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Real-PORT $remote_port;
           }
}




YouTube Video:
























via Blogger https://ift.tt/3fD1Apm
August 07, 2021 at 05:10AM Docker
0 Comments



Leave a Reply.

    Categories

    All
    Architecture
    Blog
    Checkpoint
    Cisco
    Cloud
    CyberArk
    F5
    Fortigate
    Guardium
    Juniper
    Linux
    Network
    Others
    Palo Alto
    Qualys
    Raspberry Pi
    Security
    SIEM
    Software
    Vmware
    VPN
    Wireless

    Archives

    March 2024
    February 2024
    January 2024
    December 2023
    November 2023
    October 2023
    September 2023
    August 2023
    July 2023
    June 2023
    May 2023
    April 2023
    March 2023
    February 2023
    January 2023
    December 2022
    November 2022
    October 2022
    September 2022
    August 2022
    July 2022
    June 2022
    May 2022
    April 2022
    March 2022
    February 2022
    January 2022
    December 2021
    November 2021
    October 2021
    September 2021
    August 2021
    July 2021
    June 2021
    May 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    October 2019
    September 2019
    June 2019
    July 2018
    May 2018
    December 2017
    August 2017
    April 2017
    March 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015
    September 2015
    August 2015
    July 2015
    June 2015
    May 2015
    April 2015
    March 2015

    Print Page:

    RSS Feed

    Email Subscribe
Powered by Create your own unique website with customizable templates.
  • Blog
  • Sitemap
    • Categories
  • Contact
  • About
  • Resources
  • Tools
  • 51sec.org