Skip to content

Instantly share code, notes, and snippets.

@victorvs0uz4
Last active November 1, 2018 02:38
Show Gist options
  • Select an option

  • Save victorvs0uz4/e42798857549e8df3acef47a842bf590 to your computer and use it in GitHub Desktop.

Select an option

Save victorvs0uz4/e42798857549e8df3acef47a842bf590 to your computer and use it in GitHub Desktop.
wodpress
version: '2'
services:
wordpress:
image: wordpress:latest # https://hub.docker.com/_/wordpress/
ports:
- "80:80" # change ip if required
volumes:
- ./config/php.conf.uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
- ./wp-app:/var/www/html # Full wordpress project
#- ./plugin-name/trunk/:/var/www/html/wp-content/plugins/plugin-name # Plugin development
#- ./theme-name/trunk/:/var/www/html/wp-content/themes/theme-name # Theme development
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DB_USER: root
WORDPRESS_DB_PASSWORD: password
depends_on:
- db
networks:
- wordpress-network
db:
image: mysql:latest # https://hub.docker.com/_/mysql/ - or mariadb https://hub.docker.com/_/mariadb
ports:
- "3306:3306" # change ip if required
command: [
'--default_authentication_plugin=mysql_native_password',
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_unicode_ci'
]
volumes:
- ./wp-data:/docker-entrypoint-initdb.d
environment:
MYSQL_DATABASE: wordpress
MYSQL_ROOT_PASSWORD: password
networks:
- wordpress-network
networks:
wordpress-network:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment