Update to 2022-08-10 18:00

master
Daniel Berteaud 2 years ago
parent c4d1abc39e
commit 7d3e6ba088
  1. 4
      roles/docker_wordpress/defaults/main.yml
  2. 20
      roles/docker_wordpress/tasks/main.yml
  3. 14
      roles/docker_wordpress/templates/docker-compose.j2
  4. 0
      roles/docker_wordpress/templates/welcome.j2

@ -8,8 +8,8 @@ wh_docker_root_dir: /opt/docker
# Default Wordpress configuration # Default Wordpress configuration
wh_docker_wp_image: wordpress:6.0.1-php8.1-fpm wh_docker_wp_image: wordpress:6.0.1-php8.1-fpm
wh_docker_wp_port: 8080 wh_docker_wp_port: 8080
wh_docker_url: wp.iptek.fr wh_docker_url: wordpress.org
wh_docker_admin: iptek wh_docker_admin: admin
wh_docker_pass: "S3cr3t." wh_docker_pass: "S3cr3t."
# Default DB config # Default DB config

@ -26,7 +26,25 @@
group: wheel group: wheel
mode: '0644' mode: '0644'
- name: Restart Docker # Unfortunately, this is necessary, we need to improve the functioning of iptable before - name: Create custom PHP config file for each containers
with_items: "{{ wh_docker }}"
file:
path: "{{ wh_docker_root_dir }}/wordpress/{{ item.wh_docker_name }}/custom.ini"
state: touch
owner: bin
group: wheel
mode: '0644'
- name: Create custom CRON config file for each containers
with_items: "{{ wh_docker }}"
file:
path: "{{ wh_docker_root_dir }}/wordpress/{{ item.wh_docker_name }}/custom_cron"
state: touch
owner: bin
group: wheel
mode: '0644'
- name: Restart Docker
service: name=docker state=restarted service: name=docker state=restarted
- name: Launch containers - name: Launch containers

@ -5,28 +5,26 @@ services:
restart: unless-stopped restart: unless-stopped
container_name: "wp_{{ item.wh_docker_name }}" container_name: "wp_{{ item.wh_docker_name }}"
ports: ports:
- "{{ item.wh_docker_wp_port}}" - "{{ item.wh_docker_wp_port}}":80
environment: environment:
WORDPRESS_DB_HOST: "{{ item.wh_docker_db_host }}" WORDPRESS_DB_HOST: "{{ item.wh_docker_db_host }}"
WORDPRESS_DB_USER: "{{ item.wh_docker_db_user }}" WORDPRESS_DB_USER: "{{ item.wh_docker_db_user }}"
WORDPRESS_DB_PASSWORD: "{{ item.wh_docker_db_pass }}" WORDPRESS_DB_PASSWORD: "{{ item.wh_docker_db_pass }}"
WORDPRESS_DB_NAME: "{{ item.wh_docker_db_name }}" WORDPRESS_DB_NAME: "{{ item.wh_docker_db_name }}"
volumes: volumes:
- /opt/wp/{{ item.wh_docker_name }}/html:/var/www/html - /opt/wordpress/{{ item.wh_docker_name }}/html:/var/www/html # Wordpress
# - TODO : conf PHP - /opt/wordpress/{{ item.wh_docker_name }}/custom.ini:/usr/local/etc/php/conf.d/custom.ini # Custom PHP configuration
# - TODO : Backups - /opt/wordpress/{{ item.wh_docker_name }}/custom_cron:/usr/local/etc/php/conf.d/custom_cron # Custom CRON configuration
# - TODO : cron
# - TODO : email # - TODO : email
# - TODO : Backups
phpmyadmin: phpmyadmin:
image: "{{ item.wh_docker_pma_image }}" image: "{{ item.wh_docker_pma_image }}"
restart: unless-stopped restart: unless-stopped
container_name: "pma_{{ item.wh_docker_name }}" container_name: "pma_{{ item.wh_docker_name }}"
ports: ports:
- "{{ item.wh_docker_pma_port}}" - "{{ item.wh_docker_pma_port}}":80
environment: environment:
PMA_ARBITRARY: 0 PMA_ARBITRARY: 0
PMA_HOST: "{{ item.wh_docker_db_host }}" PMA_HOST: "{{ item.wh_docker_db_host }}"
PMA_ABSOLUTE_URI: "db.{{ item.wh_docker_url }}" PMA_ABSOLUTE_URI: "db.{{ item.wh_docker_url }}"
# volumes:
# - TODO : conf PMA

Loading…
Cancel
Save