2019-09-19 22:22:51 +00:00
|
|
|
- name: Start MariaDB container
|
|
|
|
docker_container:
|
2019-11-03 03:34:03 +00:00
|
|
|
name: "{{ mariadb_name }}"
|
|
|
|
image: mariadb:{{ mariadb_version }}
|
2019-09-19 22:22:51 +00:00
|
|
|
restart_policy: always
|
|
|
|
volumes: mariadb:/var/lib/mysql
|
|
|
|
env:
|
|
|
|
MYSQL_RANDOM_ROOT_PASSWORD: "true"
|
2019-11-03 03:34:03 +00:00
|
|
|
MYSQL_DATABASE: "{{ wordpress_dbname }}"
|
|
|
|
MYSQL_USER: "{{ wordpress_dbuser }}"
|
|
|
|
MYSQL_PASSWORD: "{{ wordpress_dbpass }}"
|
2019-09-19 22:22:51 +00:00
|
|
|
|
|
|
|
- name: Start WordPress container
|
|
|
|
docker_container:
|
2019-11-05 02:26:03 +00:00
|
|
|
name: "{{ wordpress_name }}"
|
2019-11-03 03:34:03 +00:00
|
|
|
image: wordpress:{{ wordpress_version }}
|
2019-09-19 22:22:51 +00:00
|
|
|
restart_policy: always
|
|
|
|
volumes: wordpress:/var/www/html
|
2019-12-02 19:24:57 +00:00
|
|
|
labels:
|
|
|
|
traefik.http.routers.wordpress.rule: "Host(`{{ wordpress_domain }}`)"
|
2019-12-03 00:14:59 +00:00
|
|
|
traefik.enable: "true"
|
2019-09-19 22:22:51 +00:00
|
|
|
links:
|
2019-11-03 03:34:03 +00:00
|
|
|
- "{{ mariadb_name }}"
|
2019-09-19 22:22:51 +00:00
|
|
|
env:
|
2019-11-03 03:34:03 +00:00
|
|
|
WORDPRESS_DB_NAME: "{{ wordpress_dbname }}"
|
|
|
|
WORDPRESS_DB_USER: "{{ wordpress_dbuser }}"
|
|
|
|
WORDPRESS_DB_PASSWORD: "{{ wordpress_dbpass }}"
|
|
|
|
WORDPRESS_DB_HOST: "{{ mariadb_name }}"
|