Skip to content

Commit 5670d03

Browse files
authored
Merge pull request #9 from mitakeck/feature/add_redis_container
add redis container
2 parents 0dd3e69 + 3ca6417 commit 5670d03

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- Apache 2.4.6
77
- PHP 7.1.8
88
- MySQL 5.7
9-
9+
- Redis 4.0.1 (latest)
1010

1111
## Deps
1212

@@ -28,6 +28,7 @@ $ docker-compose up -d
2828
$ vim /etc/hosts
2929
127.0.0.1 web.local
3030
127.0.0.1 mysql.local
31+
127.0.0.1 redis.local
3132
```
3233

3334
open `http://web.local`

docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ services:
77
- "80:80"
88
volumes:
99
- /var/run/docker.sock:/tmp/docker.sock:ro
10+
redis:
11+
container_name: "redis"
12+
image: redis:latest
13+
ports:
14+
- "6379:6379"
15+
tty: true
16+
environment:
17+
- VIRTUAL_HOST=redis.local
1018
mysql:
1119
container_name: "mysql"
1220
build: ./docker/mysql/
@@ -26,5 +34,6 @@ services:
2634
- ./htdoc:/var/www/html
2735
links:
2836
- mysql
37+
- redis
2938
environment:
3039
- VIRTUAL_HOST=web.local

docker/php7-imagick-httpd/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RUN yum update && yum install -y wget grep git ssh bash
77
# install php7
88
RUN yum install -y epel-release && \
99
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm && \
10-
yum -y install --enablerepo=remi-php71 php php-fpm php-mcrypt php-cli php-common php-devel php-gd php-mbstring php-mysqlnd php-opcache php-pdo php-pear php-pecl-apcu php-pecl-zip php-process php-xml php-intl && \
10+
yum -y install --enablerepo=remi-php71 php php-fpm php-mcrypt php-cli php-common php-devel php-gd php-mbstring php-mysqlnd php-opcache php-pdo php-pear php-pecl-apcu php-pecl-zip php-process php-xml php-intl php-redis && \
1111
yum clean all
1212

1313
# install httpd
@@ -24,6 +24,9 @@ RUN yum --enablerepo=remi install -y ImageMagick7 ImageMagick7-devel && \
2424
echo "extension=imagick.so" >> /etc/php.ini && \
2525
echo "pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock" >> /etc/php.ini
2626

27+
# set up configure for redis
28+
RUN echo "extension=redis.so" >> /etc/php.ini
29+
2730
# install composer
2831
RUN curl -sS https://getcomposer.org/installer | php && \
2932
mv composer.phar /usr/bin/composer

0 commit comments

Comments
 (0)