Skip to content

DawTaylor/php-redis-session

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple PHP + Apache image with Redis as a session manager

This is a simple implementation of Redis as a PHP session manager behind the code.

As this is a simple implementation, it has been configured to connect to an unsecure Redis server. You can easily fix this by creating a Dockerfile and modifying the session.save_path.

FROM dawtaylor/php-redis-session

RUN sed -d 's/tcp:\/\/redis\/6379/YOUR_REDIS_CONNECTION_STRING/' /usr/local/etc/php/conf.d/docker-php-ext-redis.ini

This implementation was made to ease the migration process of a legacy PHP 5.6 application. Now it also has support for PHP 7.1.

php-redis-session:7.1-apache Dockerfile

php-redis-session:5.6-apache Dockerfile

How to use

  • Deploy a Redis container
    docker run --name redis -d redis
  • Pull the image
    docker pull dawtaylor/php-redis-session:php5.6-apache
  • Run the container
    docker run -d --name my-app -v $(PWD).:/var/www/html dawtaylor/php-redis-session:5.6-apache

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published