Giter Site home page Giter Site logo

netguycode / docker-wordpress-nginx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from raulr/nginx-wordpress-docker

0.0 0.0 0.0 32 KB

Docker image with Nginx front-end for WordPress PHP-FPM image.

Home Page: https://hub.docker.com/r/raulr/nginx-wordpress/

License: MIT License

Shell 84.38% Dockerfile 15.62%

docker-wordpress-nginx's Introduction

The official WordPress image has a PHP-FPM variant, but it still needs a web server to handle HTTP requests. This image provides an Nginx server ready to use as a wordpress:fpm front-end.

The Nginx configuration in this image is based on the guidelines given by the Wordpress Codex.

How to Use This Image

$ docker run --name some-nginx --link some-wordpress:wordpress --volumes-from some-wordpress -d -p 8080:80 raulr/nginx-wordpress

Environment Variables

  • POST_MAX_SIZE: Sets max size of post data allowed. Also affects file uploads (defaults to 64m).
  • BEHIND_PROXY: Set to true if this container is behind a reverse proxy (defaults to false unless VIRTUAL_HOST environment variable is set).
  • REAL_IP_HEADER: Defines the request header that will be used to obtain the real client IP when BEHIND_PROXY is set to true (defaults to X-Forwarded-For).
  • REAL_IP_FROM: Defines trusted addresses to obtain the real client IP when BEHIND_PROXY is set to true (defaults to 172.16.0.0/12).
  • WP_CONTAINER_NAME: Defines your Wordpress (PHP-FPM) container's name aka fastcgi_pass (defaults to wordpress).

Example docker-compose.yml:

wordpress:
  image: wordpress:fpm
  links:
    - db:mysql
nginx:
  image: raulr/nginx-wordpress
  links:
   - wordpress
  volumes_from:
   - wordpress
  ports:
   - "8080:80"
  environment:
    POST_MAX_SIZE: 128m
db:
  image: mariadb
  environment:
    MYSQL_ROOT_PASSWORD: example

Run docker-compose up, wait for it to initialize completely, and visit http://localhost:8080 or http://host-ip:8080.

docker-wordpress-nginx's People

Contributors

netguycode avatar raulr avatar lukecav avatar ccjeagle avatar cr0hn 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.