diff --git a/Dockerfile b/Dockerfile index df47a19..e33efc6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,11 @@ MAINTAINER Colin Wilson "colin@wyveo.com" # Set craft cms version ENV CRAFTURL 'https://craftcms.com/latest.zip?accept_license=yes' -# Remove existing webroot files -RUN rm -rf /usr/share/nginx/html/* +# Remove existing webroot files & set PHP session handler to Redis +RUN rm -rf /usr/share/nginx/html/* && \ +sed -i -e "s/memory_limit\s*=\s*.*/memory_limit = 256M/g" ${php_conf} && \ +sed -i -e "s/session.save_handler\s*=\s*.*/session.save_handler = redis/g" ${php_conf} && \ +sed -i -e "s/;session.save_path\s*=\s*.*/session.save_path = \"\${REDIS_PORT_6379_TCP}\"/g" ${php_conf} # Download the latest Craft, save as craft.zip in current folder RUN wget $CRAFTURL -O "/craft.zip" @@ -25,8 +28,7 @@ ADD ./default.conf /etc/nginx/conf.d/default.conf ADD ./config /usr/share/nginx/craft/config # Cleanup -RUN rm /craft.zip - -RUN chown -Rf nginx:nginx /usr/share/nginx/ +RUN rm /craft.zip && \ +chown -Rf nginx:nginx /usr/share/nginx/ EXPOSE 80 diff --git a/LICENSE b/LICENSE index 086f507..fc0318b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ -Copyright (c) 2016 wyveo.com +Copyright (c) 2017 wyveo.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/README.md b/README.md index 9b41f57..ff47a8f 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,33 @@ -[![Docker Hub; wyveo/craftcms-docker](https://img.shields.io/badge/docker%20hub-%20wyveo%2Fcraftcms--docker-blue.svg)](https://hub.docker.com/r/wyveo/craftcms-docker/) [![](https://images.microbadger.com/badges/image/wyveo/craftcms-docker.svg)](http://microbadger.com/images/wyveo/craftcms-docker "Get your own image badge on microbadger.com") [![craftcms latest](https://img.shields.io/badge/craftcms-latest-red.svg)](https://craftcms.com/) ![License MIT](https://img.shields.io/badge/license-MIT-blue.svg) +[![Docker Hub; wyveo/craftcms-docker](https://img.shields.io/badge/docker%20hub-%20wyveo%2Fcraftcms--docker-blue.svg)](https://hub.docker.com/r/wyveo/craftcms-docker/) ![License MIT](https://img.shields.io/badge/license-MIT-blue.svg) ## Introduction -This is a [Craft CMS](https://craftcms.com/) base running on our [nginx-php-fpm](https://hub.docker.com/r/wyveo/nginx-php-fpm/) docker image. +This is a [Craft CMS](https://craftcms.com/) / [Craft 3 Beta](https://craftcms.com/3) base running on our [nginx-php-fpm](https://hub.docker.com/r/wyveo/nginx-php-fpm/) docker image. +#### Versioning +| Docker Tag | Git Branch | Craft Release | Database | Caching | +|-----|-------|-----|--------|--------| +| latest | master | 2.6.2973 | MariaDB 10.1.22 | Redis 3.2.8 | +| craft3beta | craft3beta |craft 3 beta 13 | PostgreSQL 9.6.2 | Memcached 1.4.36 | Features: - - Nginx 1.11.x, PHP-FPM 7.1.x, MariaDB 10.1.x - - Redis caching + - Nginx 1.11.x, PHP-FPM 7.1.x - imageMagick image manipulation library -## Building from source -To build from source, clone the git repo and run docker-compose build: +## Clone repo and run +To run, clone the git repo and run `docker-compose up`: +#### Craft - [![version latest](https://img.shields.io/badge/version-latest-blue.svg)](https://craftcms.com/) [![](https://images.microbadger.com/badges/image/wyveo/craftcms-docker.svg)](http://microbadger.com/images/wyveo/craftcms-docker "Get your own image badge on microbadger.com") ``` $ git clone https://github.com/wyveo/craftcms-docker.git $ cd craftcms-docker -$ sudo docker-compose build +$ sudo docker-compose up -d ``` -## Running -To run the container: +navigate to `http:///admin` to begin installing Craft. + +#### Craft 3 Beta - [![version craft3beta](https://img.shields.io/badge/version-craft3beta-blue.svg)](https://craftcms.com/3) [![](https://images.microbadger.com/badges/image/wyveo/craftcms-docker:craft3beta.svg)](https://microbadger.com/images/wyveo/craftcms-docker:craft3beta "Get your own image badge on microbadger.com") ``` +$ git clone -b craft3beta --single-branch https://github.com/wyveo/craftcms-docker.git +$ cd craftcms-docker $ sudo docker-compose up -d ``` -navigate to `your-ip-address/admin` to see Craft's installation page. +navigate to `http:///index.php?p=admin` to begin installing Craft 3 Beta. diff --git a/docker-compose.yml b/docker-compose.yml index ad0fd8d..88b7f28 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,9 @@ web: - build: . + image: wyveo/craftcms-docker:latest ports: - 80:80 volumes: - - ./log:/var/log + - /var/log links: - mariadb - redis