Difference between revisions of "Docker - Testing one plugin"
From GLMWiki
(Created page with "= Using Docker to test one plugin in development = Using the glm-member-db as an example create a docker-compose file for setting up wordpress development to do testing of a p...") |
(→Using Docker to test one plugin in development) |
||
Line 14: | Line 14: | ||
docker exec {container name} "bash" | docker exec {container name} "bash" | ||
− | chown -R www-data.www-data /var/www/html/wp- | + | chown -R www-data.www-data /var/www/html/wp-content |
Revision as of 12:50, 22 May 2020
Using Docker to test one plugin in development
Using the glm-member-db as an example create a docker-compose file for setting up wordpress development to do testing of a plugin.
1. Create a main directory for this such as dockerCompose
2. Add the docker-compose.yml file to directory - updating the plugin folder name if needed.
3. copy your plugin folder into that directory.
4. Start the container
docker-compose up -d
5. Update permissions on the wp-contents directory from within docker container.
docker exec {container name} "bash" chown -R www-data.www-data /var/www/html/wp-content
file: docker-compose.yml
version: '3.1' services: wordpress: image: wordpress ports: - 80:80 environment: WORDPRESS_DB_PASSWORD: example volumes: - ./glm-member-db:/var/www/html/wp-content/plugins/glm-member-db - ./uploads:/var/www/html/wp-content/uploads mysql: image: mysql:5.7 environment: MYSQL_ROOT_PASSWORD: example volumes: - ./db_data:/var/lib/mysql volumes: glm-member-db: uploads: db_data: