Coder Social home page Coder Social logo

heydemoura / docker-compose-wordpress-nginx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mzsea/docker-compose-wordpress-nginx

0.0 3.0 0.0 33 KB

Using docker compose to launch wordpress with nginx and php-fpm.

License: Apache License 2.0

Shell 100.00%

docker-compose-wordpress-nginx's Introduction

docker-compose-wordpress-nginx

Using docker compose to launch wordpress with nginx and php-fpm.

In the repository, three ways to build wordpress.

docker-wordpress-1: Using official images to run wordpress.

docker-wordpress-2: Build the chinese version wordpress then run.

docker-wordpress-3: Separate php-fpm and wordpress, need to provide wordpress source files yourself.

Installation

Clone the repository or download zip and decompression.

$ git clone https://github.com/mzsea/docker-compose-wordpress-nginx.git

Usage

Before run, you can modify profiles with your parameters.

e.g. official image version, ports, mysql password, wordpress version.

  • If use docker-wordpress-2, don't forget to check the execute permission of docker-entrypoint.sh, if it don't has, change using :

    $ chmod 755 docker-entrypoint.sh
  • If use docker-wordpress-3, download wordpress from official website and decompress source files to wordpress folder.Note that, when docker containers started, there is still something to do, see underside.

The docker-compose.yml file using the version 2 syntax, and version 2 files are supported by Compose 1.6.0+ and require a Docker Engine of version 1.10.0+.

Final, execute the following command:

$ docker-compose up -d

When started, if use docker-wordpress-3, do next:

  1. Create database for wordpress:

    $ docker exec -it <mysql_container_name> bash
    root@e50ef7ccca8f:/# mysql -u root -p
    Enter password: your_password
    mysql> CREATE DATABASE IF NOT EXISTS `wordpress`;
    mysql> eixt;
    root@e50ef7ccca8f:/# eixt
  2. Change permissions of wordpress source files:

    $ docker exec -it <php_container_name> bash
    root@867b00000e95:/var/www/html# cd ..
    root@867b00000e95:/var/www# chown -R www-data:www-data html
    root@867b00000e95:/var/www# exit;

Then, you can configure wordpress via URL in a browser and enjoy it.

docker-compose-wordpress-nginx's People

Contributors

mzsea avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.