Wordpress standalone stack using ansible and docker
Go to file
Mike Holloway b3bffb22c0 podman-wordpress role created
modified:   ../.gitignore
	Added env files
modified:   ../ansible/playbooks/equilibrateit.com.yml
	Moved tasks to role
deleted:    ../docker-compose.yml
	Moved file to role
new file:   main.tf
	Tofu provider
new file:   variables.tf
	Tofu resource variables
deleted:    ../wordpress/apache/Dockerfile
	Changed file to template, moved to role
2024-08-22 19:03:07 -04:00
ansible/playbooks podman-wordpress role created 2024-08-22 19:03:07 -04:00
tofu podman-wordpress role created 2024-08-22 19:03:07 -04:00
.gitignore podman-wordpress role created 2024-08-22 19:03:07 -04:00
README.md README.md - Step explanation update. 2024-08-21 08:39:09 -04:00

EquilibrateIT.com

A containerized Wordpress, MySQL stack using this official upstream project Dockerfile

Environment Variables

MySQL

  • MYSQL_ROOT_PASSWORD
    • The password for the MySQL root database user
  • MYSQL_DATABASE
    • The name of the MySQL database to be created
  • MYSQL_USER
    • The name of the MySQL user to be created. Usually for web application db clients.
  • MYSQL_PASSWORD
    • The password for the above user. Best to store this encrypted at rest, via either LUKS or secret management software.

Wordpress

  • WORDPRESS_DB_NAME
    • The name of the database to be used by the Wordpress db client connection. Should match the MYSQL_DATABASE variable unless otherwise customized.
  • WORDPRESS_DB_HOST
    • Should match the docker-compose.yml service name so as to be properly resolved via the container name service of choice.
  • WORDPRESS_DB_USER
    • The name of the MySQL user created for the wordpress client to use.
  • WORDPRESS_DB_PASSWORD
    • The password for the above user. Best to store this encrypted at rest, via either LUKS or secret management software.

Files


docker-compose.yml

To Do
  • Automate installation of letsencrypt account for equilibrateit.{ca,com}
  • Renew cert, copy cert to build context, build container, delete cert
  • mysql 8.1
  • Investigate php-fpm arch?

2 services (MySQL and Wordpress/apache) and 1 ad-hoc service (wp cli in webroot volume).


ansible/playbooks/equilibrateit.yml

Roles:

  • podman-host for container host platform
  • repo-epel for certbot dependency
  • certbot for site ssl cert

Tasks:

  • Two firewalld rich rules, forwarding 80,443 to 8080,4443 rootless container ports