From e13d4b448efd7174b1b4c8723cbc8be845470c60 Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Sun, 1 Jan 2023 21:08:22 -0800 Subject: stash --- .../wordpress/templates/docker-compose.yaml.j2 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 photo.jinwei.me/config/roles/wordpress/templates/docker-compose.yaml.j2 (limited to 'photo.jinwei.me/config/roles/wordpress/templates') diff --git a/photo.jinwei.me/config/roles/wordpress/templates/docker-compose.yaml.j2 b/photo.jinwei.me/config/roles/wordpress/templates/docker-compose.yaml.j2 new file mode 100644 index 0000000..447b80b --- /dev/null +++ b/photo.jinwei.me/config/roles/wordpress/templates/docker-compose.yaml.j2 @@ -0,0 +1,22 @@ +version: '3' +services: + cloudflared: + image: cloudflare/cloudflared + container_name: cloudflare-tunnel + network_mode: host + restart: always + command: tunnel run + environment: + - TUNNEL_TOKEN={{ lookup('aws_ssm', '/jinwei-me/cloudflare/tunnel_token') }} + wordpress: + image: "{{ wordpress_image }}:{{ wordpress_image_tag }}" + volumes: + - "{{ wordpress_home }}/wp-content:/var/www/html/wp-content" + restart: always + ports: + - 30081:80 + environment: + - WORDPRESS_DB_HOST={{ lookup('aws_ssm', '/jinwei-me/mysql/host') }}:{{ lookup('aws_ssm', '/jinwei-me/mysql/port') }} + - WORDPRESS_DB_USER={{ lookup('aws_ssm', '/jinwei-me/mysql/username') }} + - WORDPRESS_DB_PASSWORD={{ lookup('aws_ssm', '/jinwei-me/mysql/password') }} + - WORDPRESS_DB_NAME={{ lookup('aws_ssm', '/jinwei-me/mysql/name') }} -- cgit v1.2.3