Docker-compose for Wordpress

Bruce Lu

August 26, 2019

Get theme bitpal.zip

docker-compose.yml for wordpress


cat docker-compose.yml

version: '3.3'

services:
   db:
     image: mysql:5.7
     volumes:
       - db_data:/var/lib/mysql
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: *
       MYSQL_DATABASE: *
       MYSQL_USER: *
       MYSQL_PASSWORD: *

   wordpress:
     depends_on:
       - db
     image: wordpress:latest
     volumes:
       - /ws/bitpal:/var/www/html/wp-content/themes/bitpal # BitPal theme install
     ports:
       - "10000:80"
     restart: always
     environment:
       WORDPRESS_DB_HOST: db:3306
       WORDPRESS_DB_USER: *
       WORDPRESS_DB_PASSWORD: *
       WORDPRESS_DB_NAME: *
volumes:
    db_data: {}

docker-compose up