I am trying to setup a development server for wordpress to work on front-send and back end. So I have this so far
version: '3.2'
services:
nginx:
image: nginx:latest
ports:
- '8000:8000'
depends_on:
- wordpress
volumes:
- ./nginx:/etc/nginx/conf.d
- wordpress-data:/var/www/html
mysql:
image: mysql:latest
ports:
- '3306:3306'
volumes:
- mysql-data:/var/lib/mysql:rw
environment:
- MYSQL_ROOT_PASSWORD=aqwe123
restart: always
wordpress-cli:
image: wordpress:cli-1.2-php5.6
depends_on:
- mysql
- wordpress
pid: 'host'
links:
- mysql
working_dir: /var/www/html
volumes:
- wordpress-data:/var/www/html
- ./install-wp.sh:/var/www/install-wp.sh
- ./wp-cli.yml:/var/www/html/wp-cli.yml
- ./uploads:/var/www/html/wp-content/uploads
entrypoint: /bin/sh
command: /var/www/install-wp.sh
environment:
- WP_VER=4.8
- WORDPRESS_DB_PASSWORD=aqwe123
restart: on-failure
wordpress:
image: wordpress:php5.6-fpm
depends_on:
- mysql
ports:
- '9000:9000'
working_dir: /var/www/html
volumes:
- wordpress-data:/var/www/html
- ./wordpress/wp-content/themes/gblsf-parallax-one:/var/www/html/wp-content/themes/gblsf-parallax-one
links:
- mysql
restart: always
volumes:
wordpress-data: {}
mysql-data:
driver: local
The problem arises when I actually use the wo-cli to create a config file
wordpress-cli_1 | Warning: file_put_contents(/var/www/html/wp-config.php): failed to open stream: Permission denied in phar:///usr/local/bin/wp/vendor/wp-cli/config-command/src/Config_Command.php on line 145 wordpress-cli_1
Error: 'wp-config.php' not found.
Based on the docker-compose configuration file....what sort of permissions do I need to resolve the permission denied error currently happening