AdnanHodzic.containerized-wordpress

Ansible Role: Containerized WordPress

This Ansible playbook sets up and runs a Docker Compose project for a WordPress website. It also configures Let's Encrypt certificates for the given domain. The setup includes three containers:

  • WordPress
  • Nginx (with HTTPS encryption using Let's Encrypt)
  • MySQL

This role is part of the containerized-wordpress-project.

Requirements

To use this role, you must have Docker and Docker Compose installed. If you haven't installed them manually, you need to install this role: AdnanHodzic.docker-compose.

Role Variables

The role has several variables defined in defaults/main.yml:

system_user: ubuntu
compose_project_dir: /home/{{ system_user }}/compose-wordpress
domain: foolcontrol.org
stage: staging
wp_version: 5.4.2
wp_db_user: admin
wp_db_psw: change-M3
db_root_psw: change-M3
wp_db_name: wordpress
wp_db_tb_pre: wp_
wp_db_host: mysql

If you run the role without changing these values, it will set up a WordPress instance with Nginx and database settings using the default values provided.

stage is an important variable, and you can find more information about it here: Let's Encrypt certificates (HTTPS encryption)

Blog posts discussing this topic:

Dependencies

To Do: Decide if the "AdnanHodzic.docker-compose-setup" role should be listed as a dependency for this role. If it should, update this section of the ReadMe and the meta code.

Example Playbook

- hosts: servers
  remote_user: "{{ system_user }}"
  roles:
    - { role: AdnanHodzic.containerized-wordpress }  

License

GPLv3

Since I work on this project in my free time, please consider supporting it with a donation of any amount!

PayPal

paypal

BitCoin

bc1qlncmgdjyqy8pe4gad4k2s6xtyr8f2r3ehrnl87

bitcoin

Informazioni sul progetto

Deploy & run Docker Compose project for WordPress instance (3 separate containers running WordPress, Nginx and MySQL) with Let's Encrypt HTTPS encryption

Installa
ansible-galaxy install AdnanHodzic.containerized-wordpress
Licenza
gpl-3.0
Download
354
Proprietario
Tech Lead at ING (DAP) Public Cloud area. Created few cool Open Source projects. Ex Debian Linux contributor, read more on: https://adnan.hodzic.org