Yet another WordPress installation repository :)
This repository shows the steps that I used for publishing my personal website.
Features
- Pre-defined themes
- Deploy with either
docker run
ordocker compose
- Reverse proxy and ssl offloading support via nginx-proxy
- Automated backup support via docker-db-backup
Detailed version of step by step installation in Turkish is here.
1. Build your custom WordPress Dockerfile
docker build . -t custom-wordpress
docker run -d --restart always -p 3306:3306 --name wordpress-db -v wordpress-db:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=root-pwd -e MYSQL_DATABASE=blog -e MYSQL_USER=mute -e MYSQL_PASSWORD=user-pwd mysql
docker run -d --restart always -p 8888:80 --name wordpress -e WORDPRESS_DB_HOST=your-db-host -e WORDPRESS_DB_NAME=blog -e WORDPRESS_DB_USER=mute -e WORDPRESS_DB_PASSWORD=user-pwd custom-wordpress
Once you completed step 1 and pushed your image to a container registry, docker-compose.yml
file can be used as another solution.
- Set your respective environment variables in
.env
- Set
DOCKER_NETWORK
env var in order to use a pre-existing network on docker VIRTUAL_HOST
andLETSENCRYPT_HOST
env vars can be used to set up an nginx-proxy configuration properly which I achived here
docker-compose up -d