Docker Compose yml for WordPress

Docker Compose yml for WordPress

Get Social!

The below docker-compose yml file will create two Docker containers for running WordPress; a MySQL database and an Apache PHP web server.

version: '3.6'

services:
    db:
        image: mysql:5.7
        container_name: wp_mysql
        volumes:
          - ./data/mysql:/var/lib/mysql
        restart: unless-stopped
        environment:
            MYSQL_ROOT_PASSWORD: [root password]
            MYSQL_DATABASE: wordpress
            MYSQL_USER: wordpress
            MYSQL_PASSWORD: [wp password]
        networks:
            wordpress:

    wordpress:
        image: wordpress:latest
        container_name: wp_web
        depends_on:
            - db
        ports:
            - 8000:80
        restart: unless-stopped
        environment:
            WORDPRESS_DB_HOST: db:3306
            WORDPRESS_DB_USER: wordpress
            WORDPRESS_DB_NAME: wordpress
            WORDPRESS_DB_PASSWORD: [wp password]
        volumes:
            - ./data/wp_content:/var/www/html/wp-content
            - ./config/wordpress/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
networks:
  wordpress:

Create a new directory and save the above file inside it as docker-compose.yml

mkdir wordpress
vi docker-compose.yml

Run docker-compose up -d to fetch the images from the docker hub and create your WordPress instance. You’ll be able to access WordPress from a browser on port 8000.


WordPress and OpenSearchServer

Get Social!

OpenSearchServer is an open source website crawler and query engine to provide advanced search capabilities to your website.

Onced you have installed OpenSearchServer you simply add an index, specify a URL to begin crawling and you website will be indexed and available to search.

WordPress has a pluginwhich integrates OpenSearchServer and replaces the existing search box to serve search queries directly to your OpenSearchServer instance. The pluginsite is available here.

Configure OpenSearchServer Search plugin

Login to your WordPress admin site and click Add New under Plugins. Search for opensearchserver and click Install Now.

Once you have the plugin installed, click Activate to enable the plugin.

You will then need to configure the OpenSearchServer plugin. The configuration page is under Plugins, then OpenSearchServer. Under Instance settings fill in your OpenSearchServer details.

  • : is the URL which points to your OpenSearchServer installation. Example: http://search.jamescoyle.net:8080/
  • The index name you created on your OpenSearchServer to hold the search database for your WordPress site.
  • : Authentication username for your OpenSearchServer.
  • : Authentication API key for your OpenSearchServer.
Click Update Settings once you have entered the details.

For better search results, I would recommend using the following code under :

title:($$)^10 OR title:("$$")^10 OR
titleExact:($$)^10 OR titleExact:("$$")^10 OR
titlePhonetic:($$)^10 OR titlePhonetic:("$$")^10 OR
url:($$)^5 OR url:("$$")^5 OR
urlSplit:($$)^5 OR urlSplit:("$$")^5 OR
urlExact:($$)^5 OR urlExact:("$$")^5 OR
urlPhonetic:($$)^5 OR urlPhonetic:("$$")^5 OR
content:($$) OR content:("$$") OR
contentExact:($$) OR contentExact:("$$") OR
contentPhonetic:($$) OR contentPhonetic:("$$")

Click Update Options once you have finished.

Your Search box is replaced as soon as you activate the OpenSearchServer plugin. You will need to make sure your Search box is available on your site.

Your search queries will now be served from your local search server!


OpenSearchServer 1.3 is now available for download

Get Social!

A new release of OpenSearchServer is available for download.

OpenSearchServer is a Java open source search engine and crawler based on Lucene and Tomcat. The crawler can index database tables, filesystems or crawl webpages from the internet or local network.

The latest version of OpenSearchServer, version 1.3 can be downloaded from Sourceforge: http://sourceforge.net/projects/opensearchserve/files/Stable_release/1.3/

After downloading OpenSearchServer, the setup takes moments and you can be indexing your data straight away. The new updates to version 1.3 are:

  • Phonetic search and geographical search
  • REST/JSON API and SOAP Webservice
  • OCR integration for PDF and pictures
  • Join queries
  • Video indexation from YouTube, Dailymotion and Vimeo based on APIs
  • Tag boost in HTML parser and data extraction through regular expression
  • XSL support and XML data upload

You can also use OpenSearchServer on your WordPress blog by installing the plugin available from http://wordpress.org/extend/plugins/opensearchserver-search/


Visit our advertisers

Quick Poll

What type of VPN protocol do you use?

Visit our advertisers