This docker-compose should be used with [NGINX Proxy Automation](https://github.com/evertramos/nginx-proxy-automation.
After everything is settle, and you have your three containers running (proxy, generator and letsencrypt) you do the following:
- Clone this repository:
git clone https://github.com/evertramos/docker-wordpress.git
- Update the service name in your docker-compose.yml file VERY IMPORTANT
You must use any name, but make sure it is a unique service name in your environment, otherwise it will conflict with other services.
- Configure your .env file:
Copy .env.sample to .env and update with your data
The proxy network must match the network name you have set in the proxy settings.
- Start your project
docker-compose up -d
Be patient - when you first run this repo, the database might take sometime to launch and the process of getting a new certificate for your domain might take some time.
Make sure the wordpress data files has user and group set to www-data, so you could update, install, delete files from your admin panel.
wp-cli (https://wp-cli.org/)
For whoever uses wp-cli here is how to implement it on this repo.
Test to see if it´s working
./wp-cli-test.sh
If you would, add the alias "wp" to your .bash_aliases
:
alias wp="docker-compose run --rm wpcli"
Next time you need to run a wp-cli command just go to where you have your docker-compose file and run a wp
command.
Running docker on Azure servers you must mount your database in your disks partitions (example: /mnt/data/
) so your db container can work. This is a some kind of issue regarding Hyper-V sharing drivers... not really sure why.
The versioning of this project matches the Server Automation and NGINX proxy automation.
Table of compatibility:
docker-wordpress | nginx-proxy-automation | server-automation |
---|---|---|
v0.5 | v0.5 | v0.5 |