Public Repository

Last pushed: a day ago
Short Description
wordpress on nginx, php-fpm, self-sign-cert, ubuntu 16.04 (docker-compose version 2)
Full Description

A Dockerfile that installs ubuntu 16.04 with wordpress 4.6.1, nginx 1.10.0, and php-fpm 7.0 based on
docker-wordpress-nginx-fpm-ssl. Database not included.

Use the following docker-compose.yml for quick stand up wordpress with mysql 5.7.
Create File: docker-compose.yml
(please make sure VARIABLES MYSQL_PASSWORD and DB_PASSWORD have the same password strings)

version: '2'
services:

  mysql:
    image: mysql:5.7
    environment:
      MYSQL_ROOT_PASSWORD:  xxxxxxxxxxxx
      MYSQL_DATABASE:       wordpressDB
      MYSQL_USER:           wordpressDBUSER
      MYSQL_PASSWORD:       xxxxxxxxxxxx
    volumes:
      - mysql-backup:/backup

  wordpress:
    image: knnleow/wordpress-nginx-selfsignedcert-version2:2.1
    environment:
      SERVER_NAME: server06.demo.co
      mysslsubject: "/C=SG/ST=Singapore/L=Singapore/O=demo.co/OU=IT_Dept/CN=server06.demo.co/emailAddress=admin01@demo.co"
      myloginuser: admin01
      myregion: Asia
      mycountry: Singapore
      DB_DATABASE: wordpressDB
      DB_USER: wordpressDBUSER
      DB_PASSWORD: xxxxxxxxxxxx
      DB_HOST: mysql
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx/log:/var/log/nginx
      - nginx-sites-available:/etc/nginx/sites-available
      - letsencrypt:/etc/letsencrypt

volumes:
  nginx-sites-available: {}
  letsencrypt: {}
  mysql-backup: {}

Execute Command to start a new wordpress instance:

$ docker-compose up

If you are running this on Server with 512MBytes RAM, please use the following link to tune up the system before running, else the mysql server will keep crashing on you when loaded.

Step 01: Add swapfile
    follow instruction from URL: https://www.kuenn.co/how-to-ubuntu-add-swapfile/
Step 02: Reboot Server
    $ sudo init 6
Docker Pull Command
Owner
knnleow

Comments (0)