Public Repository

Last pushed: 2 years ago
Short Description
My WordPress container that connects to separate MYSQL container
Full Description

Warning do not use yet - will be safe to use when this message is removed

Container created to connect to configured mysql container

Prereq:
starblade/mysql:v2 must be running

Command:
docker run --name wordpressDB -e MYSQL_ROOT_PASSWORD=password -d starblade/mysql:v2

Command:
docker run --name wordpressWB --link wordpressDB:wpANDmsql -e MYSQL_PORT_3306_TCP=tcp://172.17.0.2:3306 -e WORDPRESS_DB_HOST=wordpressDB -e WORDPRESS_DB_PASSWORD=password -P -d starblade/wordpress:v2

Note:
The value for "--name" that I am using "wordpressDB" can be changed to what ever you want as long as you change the value for "--link".

I am also so using wpANDmsql for the alias part of the link parameter, ie

[name of database container ---> wordpressDB:wpANDmsql <--- alias]

You will need to get the ip for the MYSQL_PORT_3306_TCP=tcp://xxx.xxx.xxx.xxx:3306

Use docker inspect command on mysql container once up and running or assign your own.

Once wordpress web is up and running set it up the way you want and commit the changes on web and mysql containers.

Please let me know if I made any mistakes or there is a better way to do this.

Hope this helps.
Fly safe Commanders

Docker Pull Command
Owner
starblade

Comments (1)
starblade
2 years ago

I going to update the Wordpress run command and then the Wordpress settings for multiple ports.

My goal is to be able to spin up many instances of the site using Marathon and Mesos and eventually Deis to.

SB