Wordpress Quickstart, it is a preconfigured contenerized LAMP stack configured to run wordpress with folder storage persistence.
- Clone the repository:
git clone [email protected]:markh0rr/dockerized-wordpress.git
- Setup the project:
make setup
What is done underneat
-
Download the wordpress software as a zip from wordpress.org/download.
-
Unzips the wordpress zip and store the resulting folder in the logic folder
logic/
as a folder namedwordpress
. -
Creates a public key:
ssh-keygen -t rsa -m PEM -b 4096 -C "wordpress_cms" -f ./admin/.keys/cms.key -N ""
- Create self signed ssl certificates:
openssl req -new -key admin/.keys/cms.key -out admin/certificates/crm.csr
openssl x509 -req -in admin/certificates/crm.csr -signkey admin/.keys/cms.key -out admin/certificates/cms.crt -days 365
- Adds the content of
./debug/wp-config.php
tologic/wordpress/wp-config.php
. This enables the error logs to be visible inwp-content/debug.log
.
- Build The containers
make build
- Run wordpress:
make run
On the first access to the website, wordpress initiates the website and asks to create the admin account.
The website is visible on wordpress localhost:8080.
The admin pannel is available at localhost:8080/wp-admin.
Shell into docker:
docker ps
docker exec -it <container_id> sh
Troubleshoot the database from within the cms logic container.
apk add mysql-client
mysql -u root -p -h cms_db