2019-06-21 10:32:44 +00:00
|
|
|
---
|
|
|
|
- name: Create Joomla Directories
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
# mode: 0755
|
|
|
|
with_items:
|
|
|
|
- "{{ docker_home }}/joomla"
|
2019-06-21 14:43:04 +00:00
|
|
|
|
2019-06-21 10:32:44 +00:00
|
|
|
- name: Create MySQL Directorys for Joomla
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
# mode: 0755
|
|
|
|
with_items:
|
|
|
|
- "{{ docker_home }}/JoomlaDB"
|
|
|
|
|
|
|
|
- name: MySQL Docker Container for Joomla
|
|
|
|
docker_container:
|
|
|
|
name: mysql_joomla
|
|
|
|
image: mysql
|
|
|
|
pull: true
|
|
|
|
volumes:
|
|
|
|
- "{{ docker_home }}/JoomlaDB:/var/lib/mysql"
|
|
|
|
env:
|
2019-06-22 13:09:25 +00:00
|
|
|
MYSQL_DATABASE: joomla
|
|
|
|
MYSQL_USER: joomla
|
2019-06-22 13:06:17 +00:00
|
|
|
MYSQL_PASSWORD: "{{ mysql_password }}"
|
|
|
|
MYSQL_ROOT_PASSWORD: "{{ mysql_root_password }}"
|
2019-06-21 10:32:44 +00:00
|
|
|
restart_policy: unless-stopped
|
|
|
|
memory: 1g
|
2019-06-21 14:43:04 +00:00
|
|
|
|
2019-06-21 10:32:44 +00:00
|
|
|
- name: joomla Docker Container
|
|
|
|
docker_container:
|
|
|
|
name: joomla
|
|
|
|
image: joomla
|
|
|
|
pull: true
|
|
|
|
volumes:
|
|
|
|
- "{{ docker_home }}/joomla:/var/www/html:rw"
|
|
|
|
ports:
|
|
|
|
- "8181:80"
|
|
|
|
links:
|
2019-06-21 14:56:04 +00:00
|
|
|
- "mysql_joomla:mysql_joomla"
|
2019-06-21 10:32:44 +00:00
|
|
|
env:
|
2019-06-22 13:12:12 +00:00
|
|
|
JOOMLA_DB_HOST: mysql_joomla
|
|
|
|
JOOMLA_DB_PASSWORD: "{{ mysql_password }}"
|
2019-06-21 10:32:44 +00:00
|
|
|
restart_policy: unless-stopped
|
|
|
|
memory: 1g
|
|
|
|
labels:
|
2019-06-22 13:06:17 +00:00
|
|
|
traefik.backend: "joomla"
|
2019-06-21 14:53:47 +00:00
|
|
|
traefik.frontend.rule: "Host: joomla.{{ ansible_nas_domain }}"
|
2019-06-21 10:32:44 +00:00
|
|
|
traefik.enable: "{{ joomla_available_externally }}"
|
2019-06-22 15:12:46 +00:00
|
|
|
traefik.port: "80"
|