Skip to content

Commit

Permalink
PHP configuration and README update
Browse files Browse the repository at this point in the history
  • Loading branch information
colinwilson committed Apr 21, 2017
1 parent 355fbb0 commit 84e0569
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 18 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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:

Expand Down
28 changes: 18 additions & 10 deletions README.md
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.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
web:
build: .
image: wyveo/craftcms-docker:latest
ports:
- 80:80
volumes:
- ./log:/var/log
- /var/log
links:
- mariadb
- redis
Expand Down

0 comments on commit 84e0569

Please sign in to comment.