Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
My docker-compose.yml for WP-Docker
version: '3'
services:
mysql:
image: mysql:latest
volumes:
- ./data/db:/var/lib/mysql
restart: always
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: MYSQL_ROOT_PASSWORD
MYSQL_DATABASE: wordpress
MYSQL_USER: MYSQL_USER
MYSQL_PASSWORD: MYSQL_PASSWORD
phpfpm:
image: 10up/phpfpm
depends_on:
- mysql
volumes:
- ./wordpress:/var/www/html
- ./config/php-fpm/php.ini:/usr/local/etc/php/php.ini
- ./config/php-fpm/docker-php-ext-xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
- ./config/php-fpm/www.conf:/usr/local/etc/php-fpm.d/www.conf
- ./log/nginx/error.log:/var/log/nginx/error.log
- ./log/nginx/access.log:/var/log/nginx/access.log
- /etc/localtime:/etc/localtime
restart: always
nginx:
depends_on:
- phpfpm
ports:
- 80:80
- 443:443
image: nginx:latest
volumes:
- ./wordpress:/var/www/html
- ./config/nginx:/etc/nginx
- ./config/nginx-conf.d/local.conf:/etc/nginx/conf.d/local.conf
- ./config/certs:/etc/nginx/certs
- ./log/nginx/error.log:/var/log/nginx/error.log
- ./log/nginx/access.log:/var/log/nginx/access.log
- /etc/localtime:/etc/localtime
restart: always
phpmyadmin:
image: phpmyadmin/phpmyadmin
links:
- mysql
environment:
PMA_HOST: mysql
ports:
- 8080:80
restart: always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment