Skip to content

Instantly share code, notes, and snippets.

@namtx
Last active September 24, 2019 04:21
Show Gist options
  • Select an option

  • Save namtx/536f40f753092fcc2dd0c487ba473972 to your computer and use it in GitHub Desktop.

Select an option

Save namtx/536f40f753092fcc2dd0c487ba473972 to your computer and use it in GitHub Desktop.
WP docker-compose.yml
version: '3.3'
services:
wp:
image: wordpress:latest
ports:
- "8000:80"
volumes:
- ./config/php.conf.ini:/usr/local/etc/php/conf.d/conf.ini
- ./wp-app:/var/www/html
env_file: ./containers/wp/.env
depends_on:
- db
links:
- db
wpcli:
image: wordpress:cli
volumes:
- ./containers/wpcli/install_packages.sh:/opt/install_packages.sh
- ./config/php.conf.ini:/usr/local/etc/php/conf.d/conf.ini
- ./wp-app:/var/www/html
depends_on:
- wp
command: "/opt/install_packages.sh"
db:
image: mysql:5.7
env_file: ./containers/mysql/.env
volumes:
- ./wp-data:/docker-entrypoint-initdb.d
- db_data:/var/lib/mysql
volumes:
db_data: {}
#! /bin/sh
wp plugin install advanced-custom-fields --activate --allow-root
wp plugin install smart-slider-3 --activate --allow-root
wp plugin install cpt-bootstrap-carousel --activate --allow-root
wp plugin install mw-wp-form --activate --allow-root
wp plugin install tablepress --activate --allow-root
wp plugin install font-awesome --activate --allow-root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment