הגדרות כלליות שלי wordprees it

הסבר על ההתקנה

WordPress is open source software you can use to create a beautiful website, blog, or app.

In order to setup a WordPress container on your Docker server, you’ll need a few additional things:

  • Domain Name – I use Porkbun, today’s video/blog post sponsor
  • CloudFlare Account – You can use their free accounts for this
  • NGINX Proxy Manager – Installation instructions here

Before we get into the Docker stuff, we need to setup a FREE CloudFlare account and purchase a domain (again, I use Porkbun). Once you’ve done both of those things, go into your CloudFlare account and Add A Domain.

You’ll be instructed to enter the URL you’d like to add. Do that and click next. Then select the FREE account option. CloudFlare will look for your domain’s existing DNS records if there are any.

Next, you’ll be asked to create some records. You want to create an A Record. Fill it out as shown in this image:

CloudFlare DNS

Replace the IP Address with your home’s IP Address. If you aren’t sure, you can go to Google and just type in “My IP” without quotes and it will tell you what your IP address is. Make sure to set the “Proxy status” to “DNS only” for the time being.

Once you’ve pointed the Name Servers, it may take an hour or two for the domain to actually point to CloudFlare. That’s just how domains work in this regard.

Once you’ve verified that your domain is pointed where you want, you can move forward with the next steps.

Copy the following into your Portainer Stack:

 version: '2.1'
  
 services:
  
 wordpress:
 image: wordpress
 restart: always
 ports:
 – 8282:80
 environment:
 WORDPRESS_DB_HOST: db
 WORDPRESS_DB_USER: exampleuser
 WORDPRESS_DB_PASSWORD: examplepass
 WORDPRESS_DB_NAME: exampledb
 volumes:
 – /srv/dev-disk-by-label-ssd/conf/Wordpress2:/var/www/html
 links:
 – db:db
  
 db:
 image: mysql:5.7
 restart: always
 environment:
 MYSQL_DATABASE: exampledb
 MYSQL_USER: exampleuser
 MYSQL_PASSWORD: examplepass
 MYSQL_RANDOM_ROOT_PASSWORD: '1'
 volumes:
 – db:/var/lib/mysql
  
 volumes:
 wordpress:
 db:

 

view raw
gistfile1.txt
hosted with ❤ by GitHub

 

You’ll need to change the following for your server setup:

  • Ports
  • WORDPRESS_DB_USER (in the application AND database containers)
  • WORDPRESS_DB_PASSWORD (in the application AND database containers)
  • WORDPRESS_DB_NAME (in the application AND database containers)
  • Volumes

Once you’ve done that, you can click “Deploy the Stack” and give the containers time to spin up.

When they’re done deploying you can go to http://your-server-address:8282 and you should see a WordPress install screen:

Once you reach this step, STOP.

NGINX Proxy Manager

Now you need to go to your NGINX Proxy Manager dashboard. Click the “Add a Proxy Host” button and fill in the blanks: