Commit 10c9e6b7 authored by Dave Lane's avatar Dave Lane

adding REDIS support and pspell into PHP Dockerfile, added...

adding REDIS support and pspell into PHP Dockerfile, added docker-compose.yml-sample, and initial README
parent fbf5ab27
docker-compose.yml
......@@ -8,13 +8,23 @@ ENV DEBIAN_FRONTEND="noninteractive"
# Install PHP extensions
RUN apt-get update && apt-get install -y apt-utils git less libbz2-dev libc-client-dev \
libcurl4-gnutls-dev libicu-dev libkrb5-dev libmcrypt-dev libpng-dev \
libssl-dev libxml2-dev telnet unzip zip
libpspell-dev libssl-dev libxml2-dev telnet unzip zip
RUN apt-get install -y net-tools vim dnsutils
# install cron and msmtp for outgoing email
RUN apt-get install -y cron msmtp
RUN docker-php-ext-configure imap --with-imap --with-imap-ssl --with-kerberos
RUN docker-php-ext-install bz2 curl imap intl mbstring mcrypt \
opcache soap xmlrpc zip
pspell opcache soap xmlrpc zip
# install PHPRedis
ENV PHPREDIS_VERSION 3.1.4
RUN docker-php-source extract \
&& curl -L -o /tmp/redis.tar.gz https://github.com/phpredis/phpredis/archive/$PHPREDIS_VERSION.tar.gz \
&& tar xfz /tmp/redis.tar.gz \
&& rm -r /tmp/redis.tar.gz \
&& mv phpredis-$PHPREDIS_VERSION /usr/src/php/ext/redis \
&& docker-php-ext-install redis \
&& docker-php-source delete
# install GD
RUN apt-get update && apt-get install -y \
......
This [Docker Compose https://docs.docker.com/compose/] recipe creates a set of 3 Docker containers which should let you run a very efficient [Grav https://getgrav.org] website (or multiple sites).
It provides a container based on Debian Jessie running PHP 7.0 in FPM mode, with an Nginx container for serving it (you will need to have a reverse proxy to serve it and - I recommend - provide HTTPS support - I provide an example Nginx proxy configuration for this), and, for caching performance, an optional Redis container. Support for all of these is compiled into the PHP 7.0 container.
## Quick restart
To quickly get underway, you should be able to copy the sample docker-compose.yml-sample to docker-compose.yml
`cp docker-compose.yml-sample docker-compose.yml`
version: "2"
services:
redis:
image: redis:3-alpine
app:
image: kiwilightweight/grav
volumes:
- [PATH_TO_YOUR_GRAV]:/var/www/html
restart:
unless-stopped
networks:
default:
aliases:
- [YOUR_GRAV_DOMAIN]
nginx:
image: oeru/nginx-jessie
links:
- app
- redis
ports:
- "127.0.0.1:8080:80"
volumes:
- ./nginx:/etc/nginx/conf.d
- ./nginx/cache:/var/cache/nginx
- [PATH_TO_YOUR_GRAV]:/var/www/html
restart: unless-stopped
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment