Configuration for full HTTPd / PHP stack with docker containers.
Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
logrotate.d
volumes
.editorconfig
.env.dist
.gitignore
LICENSE
README.md
docker-compose.yml

README.md

My docker configuration for LAMP stack

Build a full stack DAMP (Docker / Apache / MariaDB / PHP) using docker and docker-compose.

Requirements

  • docker >= 1.8
  • docker-compose >= 1.4

Features

Apache container

A container based on CentOS 7 and using HTTPd 2.4.12 from SCL: llaumgui/centos7-scl-httpd24:

  • Share your ~/public_http folder as document root.
  • Share ./volumes/conf/httpd24/vhost.d folder to define your vhost.d.
  • Share ./volumes/log/httpd24 to log.

PHP container

A container based on CentOS 7 using PHP 5.6 from SCL: llaumgui/centos7-scl-php56:

  • Share ./volumes/conf/php56/90-custom.ini folder to define your custumisation.
  • Share ./volumes/log/php56 to log.

MariaDB container

A MariaDB container:

  • Share ./volumes/data/mysql to store data.

Memcached container

A Memcached container.

Sphinx Search Engine container

A container based on CentOS 7 using Sphinx 2.0: llaumgui/centos7-sphinx:

  • Share ./volumes/data/sphinxse to store data.

SELinux considerations

  • Allow access to Docker at your folders:
chcon -Rt svirt_sandbox_file_t ./volumes
  • Allow access to Docker at your public_html:
semanage fcontext -a -t svirt_sandbox_file_t '/home/(.*/)?public_html(/.*)?'

Systemd considerations

  • Put systemd/docker-compose.service in /etc/systemd/system/docker-compose.service.
  • Put and setup systemd/docker-compose in /etc/sysconfig/docker-compose.