Code Monkey home page Code Monkey logo

wordpress-docker's Introduction

wordpress-docker

Boilerplates for managing multiple wordpress sites under 1 machine & 1 IP using docker-compose and NGINX.

How it works

The idea behind the whole thing is that you have your sites in docker-compose instances, where each instance has it's own wordpress, DB, and an NGINX instance. You can easily fire up new wordpress sites when needed using docker-compose, and then simply modify the main NGINX instance to route to that new webserver.

How to use

This is quick tutorial is primarly for Ubuntu-based systems. You can substitute the OS-specific commands to your own easily though.

  1. Install nginx

    sudo apt install nginx
  2. Clone this repository

git clone https://github.com/THE-SIMPLE-MARK/wordpress-docker.git

# enter the freshly cloned directory
cd wordpress-docker
  1. Modify your main NGINX config You can either modify nginx_http.conf or nginx_https.conf depending on if you intend to use https or not.

    Both files provide a basic example of the multi-domain routing. You need to replace {DOMAIN1} and {DOMAIN2} as with your actual domain(s). You can remove the instances of the second domain with a pretty basic knowledge of NGINX's config syntax if you only intend to use one or add more if you need more instances.

    sudo nano /main_nginx/nginx_http.conf
    # or
    sudo nano /main_nginx/nginx_https.conf
  2. Override the default NGINX config with your own

    sudo cp /main_nginx/nginx_http.conf /etc/nginx/nginx.conf
    # or
    sudo cp /main_nginx/nginx_https.conf /etc/nginx/nginx.conf
    
  3. Create site directory TODO

  4. Edit docker compose config TODO

  5. Create env variable TODO

  6. Create site NGINX config TODO

  7. Execute docker-compose TODO

wordpress-docker's People

Contributors

the-simple-mark avatar

Watchers

 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.