I have my docker-compose like below
"kj_wordpress":
image: kristijorgji/wordpress-php-7.1:0.0.0
volumes:
- ${KJ_WORDPRESS_PATH}:/var/www/html/app
restart: on-failure
container_name: "kj_wordpress"
This is working fine and I can access one wordpress site.
The problem is that the user of nginx (www-data) cannot access write permissions on wp-contents/uploads
and fails to upload images there.
I can fix that manually by entering inside the running container like
docker-compose exec kj_wordpress /bin/bash
then run
chown -R www-data wp-content/uploads/
That works great.
Now I want to automate the process and not have to run that every time the container is created and run.
How can I make www-data
user ot
- ${KJ_WORDPRESS_PATH}:/var/www/html/app
so the container path /var/www/html/app