-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
355fbb0
commit 84e0569
Showing
4 changed files
with
28 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,11 @@ MAINTAINER Colin Wilson "[email protected]" | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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://<HOSTNAME>/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://<HOSTNAME>/index.php?p=admin` to begin installing Craft 3 Beta. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters