Hi, I'm using docker to set up a small development environment for wordpress because I want to learn something about Docker. Normally I use virtaulHost with apache but I am interested in using the advantages that docker has (I do not want to reconfigure the apache or nginx)
This is the docker-compose.yml file that I found on the official docker page:
version: '3.3'
services:
#segun entiendo esta es el contenedor de la Base de Datos
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
wordpress:
#Este es dock del wordpress
depends_on:
- db
image: wordpress:latest
ports:
- "8000:80"
restart: always
#Aqui viene los volumenes es decir yo tengo una carpeta que contiene el docker-compose.yml y 2 carpetas donde irian los plugins y los themas
volumes:
- ./plugins/:/var/www/html/wp-content/plugins/:Z # Plugin development
- ./themes/:/var/www/html/wp-content/themes/:Z # Theme development
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
#todavia no entiendo para que es esto
volumes:
db_data:
What happens is that when I try to edit or create something in those folders I have problems with the permissions. This is quickly solved by adding permissions in the traditional way.
But I would like to know if there is a way to configure the permissions from the docker-compose.yml so that you do not have to use chmod 777 in the folders where I have put the themes and plugins