aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclarkzjw <[email protected]>2022-12-12 12:21:57 -0800
committerclarkzjw <[email protected]>2022-12-12 12:21:57 -0800
commitae273d3a79fa4a902ecbaca6fdbf49631e8d7234 (patch)
tree54fab1db2dd5bddad9e3607f5269a34b424c1151 /jinwei.me
parentc7dad7de56fa1ea50257220d2b62ad4520dcdeab (diff)
downloadjinwei.me-ae273d3a79fa4a902ecbaca6fdbf49631e8d7234.tar.gz
infra: use host network and port mapping
config: change ttrss to freshrss
Diffstat (limited to 'jinwei.me')
-rw-r--r--jinwei.me/config/roles/wordpress/templates/docker-compose.yaml.j23
-rw-r--r--jinwei.me/infra/cloudflare.tf4
2 files changed, 5 insertions, 2 deletions
diff --git a/jinwei.me/config/roles/wordpress/templates/docker-compose.yaml.j2 b/jinwei.me/config/roles/wordpress/templates/docker-compose.yaml.j2
index be85fb4..447b80b 100644
--- a/jinwei.me/config/roles/wordpress/templates/docker-compose.yaml.j2
+++ b/jinwei.me/config/roles/wordpress/templates/docker-compose.yaml.j2
@@ -3,6 +3,7 @@ services:
3 cloudflared: 3 cloudflared:
4 image: cloudflare/cloudflared 4 image: cloudflare/cloudflared
5 container_name: cloudflare-tunnel 5 container_name: cloudflare-tunnel
6 network_mode: host
6 restart: always 7 restart: always
7 command: tunnel run 8 command: tunnel run
8 environment: 9 environment:
@@ -12,6 +13,8 @@ services:
12 volumes: 13 volumes:
13 - "{{ wordpress_home }}/wp-content:/var/www/html/wp-content" 14 - "{{ wordpress_home }}/wp-content:/var/www/html/wp-content"
14 restart: always 15 restart: always
16 ports:
17 - 30081:80
15 environment: 18 environment:
16 - WORDPRESS_DB_HOST={{ lookup('aws_ssm', '/jinwei-me/mysql/host') }}:{{ lookup('aws_ssm', '/jinwei-me/mysql/port') }} 19 - WORDPRESS_DB_HOST={{ lookup('aws_ssm', '/jinwei-me/mysql/host') }}:{{ lookup('aws_ssm', '/jinwei-me/mysql/port') }}
17 - WORDPRESS_DB_USER={{ lookup('aws_ssm', '/jinwei-me/mysql/username') }} 20 - WORDPRESS_DB_USER={{ lookup('aws_ssm', '/jinwei-me/mysql/username') }}
diff --git a/jinwei.me/infra/cloudflare.tf b/jinwei.me/infra/cloudflare.tf
index c8018d6..1b157d8 100644
--- a/jinwei.me/infra/cloudflare.tf
+++ b/jinwei.me/infra/cloudflare.tf
@@ -55,12 +55,12 @@ resource "cloudflare_tunnel_config" "tunnel_route" {
55 ingress_rule { 55 ingress_rule {
56 hostname = "jinwei.me" 56 hostname = "jinwei.me"
57 path = "/" 57 path = "/"
58 service = "http://wordpress:80" 58 service = "http://127.0.0.1:30081"
59 } 59 }
60 ingress_rule { 60 ingress_rule {
61 hostname = "feed.jinwei.me" 61 hostname = "feed.jinwei.me"
62 path = "/" 62 path = "/"
63 service = "http://127.0.0.1:30080" 63 service = "http://127.0.0.1:30082"
64 } 64 }
65 ingress_rule { 65 ingress_rule {
66 service = "http_status:404" 66 service = "http_status:404"
Powered by cgit v1.2.3 (git 2.41.0)