wordpress: Add wordpress service template
This commit is contained in:
parent
07468c2efa
commit
43b3caa31e
24
services/wordpress/stack.yml
Normal file
24
services/wordpress/stack.yml
Normal file
@ -0,0 +1,24 @@
|
||||
version: "{{ compose_version }}"
|
||||
|
||||
services:
|
||||
wordpress:
|
||||
image: wordpress
|
||||
networks: ["{{ ingress_network }}", "default"]
|
||||
environment:
|
||||
WORDPRESS_DB_HOST: "{{ database_mysql_host }}"
|
||||
WORDPRESS_DB_USER: "{{ wordpress_db_user }}"
|
||||
WORDPRESS_DB_PASSWORD: "{{ wordpress_db_pass }}"
|
||||
WORDPRESS_DB_NAME: "{{ wordpress_db_name }}"
|
||||
volumes:
|
||||
- wordpress_data:/var/www/html
|
||||
deploy:
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.{{ service }}.rule={{ traefik_routing_rule }}
|
||||
- traefik.http.routers.{{ service }}.tls=true
|
||||
- traefik.http.routers.{{ service }}.tls.certresolver=lets-encrypt
|
||||
- traefik.http.routers.{{ service }}.middlewares=gzip@file
|
||||
- traefik.http.services.{{ service }}.loadbalancer.server.port=80
|
||||
|
||||
volumes:
|
||||
wordpress_data: ~
|
2
services/wordpress/vars/defaults.yaml
Normal file
2
services/wordpress/vars/defaults.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
wordpress_db_pass: "{{ mysql_user_passwords[wordpress_db_user] }}"
|
Loading…
Reference in New Issue
Block a user