Skip to content

Instantly share code, notes, and snippets.

@KaySchneider
Created October 16, 2017 17:34
Show Gist options
  • Save KaySchneider/1853afc5a021a6672a5adb00f4f4896b to your computer and use it in GitHub Desktop.
Save KaySchneider/1853afc5a021a6672a5adb00f4f4896b to your computer and use it in GitHub Desktop.
This docker-compose can be used to run magento and a mysql database inside docker on an development machine ;-) And with some changes also in production.
version: '2'
services:
web:
image: meanbee/magento:5.6-apache
hostname: localdomain.dev
environment:
- DOCKER_FIX=true
- DEBUG=true
- VIRTUAL_HOST=http://localdomain.dev
- ENABLE_SENDMAIL=true
- PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- PHP_INI_DIR=/usr/local/etc/php
- APACHE_CONFDIR=/etc/apache2
- APACHE_ENVVARS=/etc/apache2/envvars
- PHP_EXTRA_BUILD_DEPS=apache2-dev
- PHP_EXTRA_CONFIGURE_ARGS=--with-apxs2
- PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2
- PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2
- PHP_LDFLAGS=-Wl,-O1 -Wl,--hash-style
- PHP_VERSION=5.6.30
volumes:
- /home/[your path to local magento data root path]/:/var/www/html/
ports:
- 80:80
- 443
links:
- db
db:
image: mysql:mage
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_PASSWORD=test
- MYSQL_USER=test
- MYSQL_DATABASE=yourdatabasename
volumes:
- /home/...[path to custom mysql data]/:/var/lib/mysql/
ports:
- 8306:3306
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment