Giter Site home page Giter Site logo

marrem / docker-wordpress-multi-fpm Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 4 KB

Deploying multiple wordpress sites lightweight (alpine-fpm) behind nginx as reverse proxy

wordpress-container wordpress docker docker-compose nginx nginx-container reverse-proxy fpm

docker-wordpress-multi-fpm's Introduction

Easily deploy multiple Wordpress sites

Wordpress alpine-fpm containers behind nginx as reverse proxy

Quick start

  • Clone repo
  • Change into repo directory
  • Run: docker stack deploy -c wordpress-multi-fpm.yml <stack_name>

Since fpm only handles php execution, the nginx container has to have access to the same file system as the wordpress container. This is accomplished by mounting the siteN_html into the nginx container as /siteN and into the wordpress container as /var/www/html

Wordpress containers normally mount an anonymous volume at /var/www/html. This is done in order to easily upgrade to a new version of wp. You change the image tag and restart the container. So it is unfortunate that nginx needs to access the volume as well. This necessitates creating a named volume. Now you will have to remove this named volume before up- (or down-) grading the wordpress container. Of course you will want to keep your site content (uploads, plugins, themes, etc), so I mount this as a seperate volume as siteN/wp-content into the nginx container, and as /var/www/html/wp-content into the wordpress containers

docker-wordpress-multi-fpm's People

Contributors

marrem avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

mkedica

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.