Reputation: 5088
I am running the latest Docker mac app and have created a new docker-compose.yml
in my project directory. (which is my wordpress theme).
This is my docker-compose.yml
config file below, following the steps from their https://docs.docker.com/compose/wordpress/
I've also added some params to the wordpress block to keep my database persistent so I don't loose my database when I docker-compose up -d
version: '3.7'
networks:
wordpress:
ipam:
config:
- subnet: 172.25.0.0/16
services:
db:
image: mysql:5.7
volumes:
- ./db:/var/lib/mysql:delegated
ports:
- "3306:3306"
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
networks:
- wordpress
wordpress:
depends_on:
- db
image: wordpress:latest
volumes:
- .:/var/www/html/wp-content/themes/testing:delegated
ports:
- "80:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
WORDPRESS_AUTH_KEY: 5f6ede1b94d25a2294e29eeba929a8c80a5ac0fb
WORDPRESS_SECURE_KEY: 5f6ede1b94d25a2294e29eeba929a8c80a5ac0fb
WORDPRESS_LOGGED_IN_KEY: 5f6ede1b94d25a2294e29eeba929a8c80a5ac0fb
WORDPRESS_NONCE_KEY: 5f6ede1b94d25a2294e29eeba929a8c80a5ac0fb
WORDPRESS_SECURE_AUTH_SALT: 5f6ede1b94d25a2294e29eeba929a8c80a5ac0fb
WORDPRESS_LOGGED_IN_SALT: 5f6ede1b94d25a2294e29eeba929a8c80a5ac0fb
WORDPRESS_NONCE_SALT: 5f6ede1b94d25a2294e29eeba929a8c80a5ac0fb
WORDPRESS_DEBUG: 1
networks:
- wordpress
But I'm having troubles working out how to upload plugins as it's asking me for FTP credentials.
Any ideas would be hugely appreciated. Thanks.
Upvotes: 0
Views: 1197
Reputation: 111
It seems like your having trouble with WordPress plugins directory perms. Go inside of this container and chmod -r 755 ./plugins. Also check the owner of the directory. And change it to www-data.
Upvotes: 1