Skip to content

Instantly share code, notes, and snippets.

@Shipu
Created March 30, 2019 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shipu/87f7eb3f66f2a69d2bd7f8c69c3e3e09 to your computer and use it in GitHub Desktop.
Save Shipu/87f7eb3f66f2a69d2bd7f8c69c3e3e09 to your computer and use it in GitHub Desktop.
Docker Lamp
version: "3"
services:
webserver:
build:
context: ./bin/webserver
container_name: '5.6.x-webserver'
restart: 'always'
ports:
- "8080:80"
- "443:443"
links:
- mysql
volumes:
- ${DOCUMENT_ROOT-./www}:/var/www/html
- ${PHP_INI-./config/php/php.ini}:/usr/local/etc/php/php.ini
- ${VHOSTS_DIR-./config/vhosts}:/etc/apache2/sites-enabled
- ${LOG_DIR-./logs/apache2}:/var/log/apache2
mysql:
build: ./bin/mysql
container_name: '5.7-mysql'
restart: 'always'
ports:
- "52000:3306"
volumes:
- ${MYSQL_DATA_DIR-./data/mysql}:/var/lib/mysql
- ${MYSQL_LOG_DIR-./logs/mysql}:/var/log/mysql
environment:
MYSQL_ROOT_PASSWORD: tiger
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: 'sc-phpmyadmin'
links:
- mysql
environment:
PMA_HOST: mysql
PMA_PORT: 3306
ports:
- '8000:80'
volumes:
- /sessions
DOCUMENT_ROOT=./www
VHOSTS_DIR=./config/vhosts
APACHE_LOG_DIR=./logs/apache2
PHP_INI=./config/php/php.ini
MYSQL_DATA_DIR=./data/mysql
MYSQL_LOG_DIR=./logs/mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment