Skip to content

Instantly share code, notes, and snippets.

@julienV
Last active March 29, 2022 11:43
Show Gist options
  • Save julienV/f19aebcb32ef2b02af500f5d7fb7bc8a to your computer and use it in GitHub Desktop.
Save julienV/f19aebcb32ef2b02af500f5d7fb7bc8a to your computer and use it in GitHub Desktop.
docker-compose.yml for php 5.4
version: '2'
services:
web:
image: "alterway/php:5.4-apache"
ports:
- "8080:80"
volumes:
- .:/var/www/html
environment:
PHP_php5enmod: 'memcached xdebug mysql mysqli pdo_mysql gd'
PHP__display_errors: 'On'
PHP__error_reporting: 'E_ALL'
PHP__xdebug.remote_enable: 'on'
PHP__xdebug.remote_autostart: 'on'
PHP__xdebug.remote_connect_back: 'off'
PHP__xdebug.remote_handler: 'dbgp'
PHP__xdebug.profiler_enable: '0'
PHP__xdebug.profiler_output_dir: '/var/www/html'
PHP__xdebug.remote_port: '9000'
XDEBUG_CONFIG: 'remote_host=172.18.0.1'
PHP_IDE_CONFIG: 'serverName=dockerized'
HTTPD_a2enmod: 'rewrite status expires'
links:
- db
- mailcatcher
db:
image: mysql:5.6
volumes:
- ./db:/var/lib/mysql
- .:/tmp/local
environment:
- MYSQL_USER=root
- MYSQL_PASSWORD=docker
- MYSQL_ROOT_PASSWORD=docker
- MYSQL_DATABASE=myapp
mailcatcher:
image: yappabe/mailcatcher
ports:
- 1025:1025
- 1080:1080
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
#PMA_ARBITRARY: 1
MYSQL_USER: root
MYSQL_PASSWORD: docker
MYSQL_ROOT_PASSWORD: docker
ports:
- 8081:80
links:
# for mysql container
- db:db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment