Sign inSign up

ericpoe/grav-fpm

By ericpoe

•Updated almost 7 years ago

A basic Grav container using php-fpm 7.1+

Image
1

3.0K

ericpoe/grav-fpm repository overview

⁠docker-grav-fpm

A Docker container for serving up a Grav site using php-fpm

This sets up a bare-bones, no frills Grav⁠ site using php-fpm 7.1+

Since this image is based upon the official php-fpm Docker image build from PHP⁠, these images get updated within minutes of those source images getting updated.

7.3, latest (v7.3/php/Dockerfile)⁠ 7.2 (v7.2/php/Dockerfile)⁠ 7.1 (v7.1/php/Dockerfile)⁠

⁠How to use this image

⁠Docker-Compose

For a bare-bones setup of a Grav site:

⁠Suppose you want more than just the default site and default content

You could map your dev user directory to the dockerized user directory.

version: '3'

services:
    web:
        image: nginx:latest
        ports:
            - "8000:80"
        volumes:
            - ./site.conf:/etc/nginx/conf.d/default.template
            - web-volume:/var/www/html
            - ./src/user/:/var/www/html/user ## <-- Here
        environment:
            - NGINX_HOST=${NGINX_HOST}
        command: /bin/sh -c "envsubst '$$NGINX_HOST' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
        depends_on:
            - php
    php:
        image: ericpoe/grav-fpm:latest
        volumes:
            - web-volume:/var/www/html
            - ./src/user/:/var/www/html/user ## <-- Here
volumes:
    web-volume:

An example .env to be stored in the same directory as the above docker-compose.yml:

# Nginx
NGINX_HOST=localhost

⁠Comments and Pull Requests Welcome

If you find a bug or want to make a pull request, please do so at this image's Github repository⁠. Please follow the Contributing guidelines⁠.

Feel free to reach out to me via Twitter: @eric_poe⁠

Tag summary

Content type

Image

Digest

Size

198.2 MB

Last updated

almost 7 years ago

docker pull ericpoe/grav-fpm