The following repo is for hosting wordpress application on a ubuntu 20.04 virtual machine. I have successfully ran this script on a digital ocean droplet, but I assume this setup.sh script could be modified or used on any potential ubuntu VM host.
- create a ubuntu 20.04 Digital Ocean droplet.
- ssh into your droplet, i.e.
ssh [email protected]
- setup an A record which points your domain to the IP of your droplet (A blog.thewebdevjunkie.com => 127.127.127.127)
- clone the repo
git clone https://github.com/codyseibert/wordpress-quick-start.git
- cd into the directory
cd wordpress-quick-start
- modify
.env
to replace your secret passwords - modify
Caddyfile
to have the domain or subdomain you expect to host your wordpress site - run the setup script:
./setup.sh
- load up a web browser to your domain (it might take a minute to host the database, wordpress, and Caddy, so give it some time)
I followed the following documentation to figure out most of the necessary docker / caddy setup.
- https://minhcung.me/how-to-start-wordpress-with-caddy/
- https://docs.docker.com/engine/install/ubuntu/
- https://docs.docker.com/compose/install/
- https://docs.docker.com/samples/wordpress/
If you make changes to your docker-compose.yml file, you may need to rebuild / restart your services using the following command
docker-compose up -d --build