A basic Grav container using php-fpm 7.1+
3.0K
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.
Dockerfile links7.3, latest (v7.3/php/Dockerfile)
7.2 (v7.2/php/Dockerfile)
7.1 (v7.1/php/Dockerfile)
For a bare-bones setup of a Grav site:
docker-compose upYou 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
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
Content type
Image
Digest
Size
198.2 MB
Last updated
almost 7 years ago
docker pull ericpoe/grav-fpm