Sign inSign up

unitedasian/grav

By unitedasian

•Updated over 10 years ago

A Docker image to run a grav website inside a container via nginx and php-fpm.

Image
2

1.9K

unitedasian/grav repository overview

⁠unitedasian/grav

A Docker image that can be used to run a grav⁠ website inside a container via nginx and php-fpm.

⁠Usage

Create your grav⁠ website as per the instructions from the Grav documentation⁠.

⁠Using the original image
docker run -d -p 8000:80 -v `pwd`:/usr/share/nginx/html unitedasian/grav

To customize PHP, PHP-FPM settings and nginx configuration, create the relevant configuration files in your host and mount them on the container:

docker run -d -p 8000:80 \
	-v `pwd`/php.ini:/etc/php5/fpm/conf.d/local.ini \
	-v `pwd`/php-fpm.conf:/etc/php5/fpm/pool.d/ww.conf \
	-v `pwd`/nginx.conf:/etc/nginx/nginx.conf \
	-v `pwd`:/usr/share/nginx/html \
	unitedasian/grav
⁠Using your own image

Create a Dockerfile with the following contents:

FROM unitedasian/grav

COPY . /usr/share/nginx/html

RUN chown -R www-data:www-data /usr/share/nginx/html && \
	chmod -R 775 /usr/share/nginx/html && \
	chmod -R +s /usr/share/nginx/html && \
	umask 0002

# Customize PHP settings (optional)
# COPY php.ini /etc/php5/fpm/conf.d/local.ini

# Customize PHP-FPM settings (optional)
# COPY php-fpm.conf /etc/php5/fpm/pool.d/www.conf

# Customize nginx configuration (optional)
# COPY nginx.conf /etc/nginx/nginx.conf

CMD ["/entrypoint.sh"]
⁠Important

This image does NOT include a Grav installation. It assumes you already have a working Grav site which will be mounted on the container.

Tag summary

Content type

Image

Digest

Size

92 MB

Last updated

over 10 years ago

docker pull unitedasian/grav