Skip to content

Instantly share code, notes, and snippets.

@md5
Last active May 11, 2025 13:13
Show Gist options
  • Save md5/d9206eacb5a0ff5d6be0 to your computer and use it in GitHub Desktop.
Save md5/d9206eacb5a0ff5d6be0 to your computer and use it in GitHub Desktop.

Revisions

  1. md5 revised this gist Mar 14, 2015. 1 changed file with 0 additions and 7 deletions.
    7 changes: 0 additions & 7 deletions 00_README.md
    Original file line number Diff line number Diff line change
    @@ -8,13 +8,6 @@ Build a copy of this image:
    cd docker-nginx-fpm
    docker build -t nginx-fpm .

    Build a `wordpress:fpm` image:

    git clone git://github.com/md5/wordpress.git docker-wordpress-fpm
    cd docker-wordpress-fpm
    git checkout add-fpm-variant
    docker build -t wordpress:fpm fpm

    Launch an instance of `wordpress:fpm` just as you'd launch `wordpress`:

    docker run -d --link some-mysql:mysql --name wordpress-fpm wordpress:fpm
  2. md5 revised this gist Jan 31, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions 00_README.md
    Original file line number Diff line number Diff line change
    @@ -4,8 +4,8 @@ Proof of concept setup for Wordpress running under PHP-FPM with an Nginx fronten

    Build a copy of this image:

    git clone git://github.com/d9206eacb5a0ff5d6be0.git docker-wordpress-fpm-nginx
    cd docker-wordpress-fpm-nginx
    git clone git://github.com/d9206eacb5a0ff5d6be0.git docker-nginx-fpm
    cd docker-nginx-fpm
    docker build -t nginx-fpm .

    Build a `wordpress:fpm` image:
  3. md5 revised this gist Jan 31, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions 00_README.md
    Original file line number Diff line number Diff line change
    @@ -3,6 +3,7 @@ Proof of concept setup for Wordpress running under PHP-FPM with an Nginx fronten
    ## Usage

    Build a copy of this image:

    git clone git://github.com/d9206eacb5a0ff5d6be0.git docker-wordpress-fpm-nginx
    cd docker-wordpress-fpm-nginx
    docker build -t nginx-fpm .
  4. md5 renamed this gist Jan 31, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md → 00_README.md
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ Proof of concept setup for Wordpress running under PHP-FPM with an Nginx fronten
    ## Usage

    Build a copy of this image:
    git clone git://github.com/NNNNNNNNN.git docker-wordpress-fpm-nginx
    git clone git://github.com/d9206eacb5a0ff5d6be0.git docker-wordpress-fpm-nginx
    cd docker-wordpress-fpm-nginx
    docker build -t nginx-fpm .

  5. md5 created this gist Jan 31, 2015.
    2 changes: 2 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    FROM nginx:1.7
    COPY wordpress-fpm.conf /etc/nginx/conf.d/default.conf
    23 changes: 23 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    Proof of concept setup for Wordpress running under PHP-FPM with an Nginx frontend

    ## Usage

    Build a copy of this image:
    git clone git://github.com/NNNNNNNNN.git docker-wordpress-fpm-nginx
    cd docker-wordpress-fpm-nginx
    docker build -t nginx-fpm .

    Build a `wordpress:fpm` image:

    git clone git://github.com/md5/wordpress.git docker-wordpress-fpm
    cd docker-wordpress-fpm
    git checkout add-fpm-variant
    docker build -t wordpress:fpm fpm

    Launch an instance of `wordpress:fpm` just as you'd launch `wordpress`:

    docker run -d --link some-mysql:mysql --name wordpress-fpm wordpress:fpm

    Launch an instance of this image to front `wordpress:fpm` and serve static assets:

    docker run -d --link wordpress-fpm:fpm --volumes-from wordpress-fpm -p 80:80 nginx-fpm
    28 changes: 28 additions & 0 deletions wordpress-fpm.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    server {
    listen 80;
    server_name localhost;
    root /var/www/html;

    index index.php;

    location / {
    try_files $uri $uri/ /index.php?$args;
    }

    rewrite /wp-admin$ $scheme://$host$uri/ permanent;

    location ~ [^/]\.php(/|$) {
    fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    if (!-f $document_root$fastcgi_script_name) {
    return 404;
    }

    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;

    fastcgi_pass fpm:9000;
    fastcgi_index index.php;
    }
    }