2021-03-13 08:11:56 +00:00
|
|
|
- name: Start WordPress database container
|
2023-05-04 03:42:55 +00:00
|
|
|
community.general.docker_container:
|
2021-03-13 08:11:56 +00:00
|
|
|
name: "{{ wordpress_dbcontainer }}"
|
|
|
|
image: mariadb:{{ wordpress_dbversion }}
|
2019-09-19 22:22:51 +00:00
|
|
|
restart_policy: always
|
2021-03-13 08:11:56 +00:00
|
|
|
volumes: "{{ wordpress_dbroot }}:/var/lib/mysql"
|
2019-09-19 22:22:51 +00:00
|
|
|
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
|
2023-05-04 03:42:55 +00:00
|
|
|
community.general.docker_container:
|
2021-03-13 08:11:56 +00:00
|
|
|
name: "{{ wordpress_container }}"
|
2019-11-03 03:34:03 +00:00
|
|
|
image: wordpress:{{ wordpress_version }}
|
2019-09-19 22:22:51 +00:00
|
|
|
restart_policy: always
|
2021-03-13 08:11:56 +00:00
|
|
|
volumes:
|
|
|
|
- "{{ wordpress_docroot }}:/var/www/html"
|
2019-12-02 19:24:57 +00:00
|
|
|
labels:
|
2021-03-14 04:52:50 +00:00
|
|
|
traefik.http.routers.wordpress.rule: "{{ wordpress_rule }}"
|
2021-03-13 08:11:56 +00:00
|
|
|
traefik.http.routers.wordpress.entrypoints: websecure
|
|
|
|
traefik.http.routers.wordpress.tls.certresolver: letsencrypt
|
|
|
|
traefik.http.routers.wordpress.middlewares: securehttps@file
|
|
|
|
traefik.docker.network: traefik
|
2019-12-03 00:14:59 +00:00
|
|
|
traefik.enable: "true"
|
2019-09-19 22:22:51 +00:00
|
|
|
links:
|
2021-03-13 08:11:56 +00:00
|
|
|
- "{{ wordpress_dbcontainer }}"
|
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 }}"
|
2021-03-13 08:11:56 +00:00
|
|
|
WORDPRESS_DB_HOST: "{{ wordpress_dbcontainer }}"
|
2021-03-13 23:55:15 +00:00
|
|
|
WORDPRESS_CONFIG_EXTRA: "{{ wordpress_config_extra }}"
|