Skip to content

Latest commit

 

History

History

wordpress

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Prerequisites

  1. [mysql] (https://github.com/hasura/quickstart-docker-git/tree/master/mysql)

You need to have a MySQL database up and running for Wordpress to work.

Quickstart - Build your own Docker image#

Build the Docker image using the following command

$ docker build -t php-wordpress:<tag> .

Run the Docker container using the command below.

$ docker run -d -p 8080:80 php-wordpress:<tag>
$ docker run -e WORDPRESS_DB_HOST=<DOCKER_IP> -e WORDPRESS_DB_PASSWORD=<DB_PASSWORD> -v /your/path/to/wordpress:/var/www/html/wp-content/ -d -p 8080:80 php-wordpress:<tag>

Quickstart - git based pipeline

Follow the steps mentioned below for git based pipeline

  1. Ensure that you have a git project

  2. Commit your changes

    $ git add .
    $ git commit -m "message"
  3. Push the changes to git

    $ git push <remote> master

Advanced usage

Environment Variables

  • WORDPRESS_DB_HOST - Host of MySQL server.
  • WORDPRESS_DB_PASSWORD - Password of MYSQL database.
  • WORDPRESS_DB_USER - UserName of MYSQL database (defaults to "root").
  • WORDPRESS_DB_NAME - Database Name (defaults to "wordpress").

Volumes

  • /var/www/html - Should contain the wordpress source files (/your/path/to/wordpress)