diff options
4 files changed, 23 insertions, 26 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" |
diff --git a/rss.jinwei.me/config/roles/rss/tasks/main.yaml b/rss.jinwei.me/config/roles/rss/tasks/main.yaml index 070c48e..d70729a 100644 --- a/rss.jinwei.me/config/roles/rss/tasks/main.yaml +++ b/rss.jinwei.me/config/roles/rss/tasks/main.yaml | |||
@@ -20,7 +20,7 @@ | |||
20 | login_user: "{{ lookup('aws_ssm', '/jinwei-me/mysql/username') }}" | 20 | login_user: "{{ lookup('aws_ssm', '/jinwei-me/mysql/username') }}" |
21 | login_password: "{{ lookup('aws_ssm', '/jinwei-me/mysql/password') }}" | 21 | login_password: "{{ lookup('aws_ssm', '/jinwei-me/mysql/password') }}" |
22 | name: "{{ lookup('aws_ssm', '/jinwei-me/mysql/ttrss_db_user') }}" | 22 | name: "{{ lookup('aws_ssm', '/jinwei-me/mysql/ttrss_db_user') }}" |
23 | host: "*" | 23 | host: "%" |
24 | password: "{{ lookup('aws_ssm', '/jinwei-me/mysql/ttrss_db_password') }}" | 24 | password: "{{ lookup('aws_ssm', '/jinwei-me/mysql/ttrss_db_password') }}" |
25 | priv: "{{ lookup('aws_ssm', '/jinwei-me/mysql/ttrss_db_name') }}.*:ALL" | 25 | priv: "{{ lookup('aws_ssm', '/jinwei-me/mysql/ttrss_db_name') }}.*:ALL" |
26 | state: present | 26 | state: present |
diff --git a/rss.jinwei.me/config/roles/rss/templates/docker-compose.yaml.j2 b/rss.jinwei.me/config/roles/rss/templates/docker-compose.yaml.j2 index 7a2411a..b79dbaa 100644 --- a/rss.jinwei.me/config/roles/rss/templates/docker-compose.yaml.j2 +++ b/rss.jinwei.me/config/roles/rss/templates/docker-compose.yaml.j2 | |||
@@ -1,29 +1,23 @@ | |||
1 | version: "3" | 1 | version: "3" |
2 | services: | 2 | services: |
3 | ttrss: | 3 | freshrss: |
4 | image: wangqiru/ttrss:nightly-2022-08-09 | 4 | image: freshrss/freshrss:edge |
5 | container_name: ttrss | 5 | container_name: freshrss |
6 | environment: | ||
7 | - SELF_URL_PATH={{ lookup('aws_ssm', '/jinwei-me/ttrss/url') }} | ||
8 | - DB_HOST={{ lookup('aws_ssm', '/jinwei-me/mysql/host') }} | ||
9 | - DB_PORT={{ lookup('aws_ssm', '/jinwei-me/mysql/port') }} | ||
10 | - DB_NAME={{ lookup('aws_ssm', '/jinwei-me/mysql/ttrss_db_name') }} | ||
11 | - DB_USER={{ lookup('aws_ssm', '/jinwei-me/mysql/ttrss_db_user') }} | ||
12 | - DB_PASS={{ lookup('aws_ssm', '/jinwei-me/mysql/ttrss_db_password') }} | ||
13 | - PUID=1000 | ||
14 | - PGID=1000 | ||
15 | ports: | ||
16 | - 30080:80 | ||
17 | volumes: | ||
18 | - {{ rss_home }}/feed-icons:/var/www/feed-icons/ | ||
19 | stdin_open: true | ||
20 | tty: true | ||
21 | restart: always | ||
22 | |||
23 | mercury: | ||
24 | image: wangqiru/mercury-parser-api:latest | ||
25 | container_name: ttrss_mercury | ||
26 | restart: always | 6 | restart: always |
7 | logging: | ||
8 | options: | ||
9 | max-size: 10m | ||
10 | volumes: | ||
11 | # Recommended volume for FreshRSS persistent data such as configuration and SQLite databases | ||
12 | - {{ rss_home }}/data:/var/www/FreshRSS/data | ||
13 | # Optional volume for storing third-party extensions | ||
14 | - {{ rss_home }}/extensions:/var/www/FreshRSS/extensions | ||
15 | ports: | ||
16 | # If you want to open a port 8080 on the local machine: | ||
17 | - 30082:80 | ||
18 | environment: | ||
19 | # A timezone http://php.net/timezones (default is UTC) | ||
20 | TZ: America/Vancouver | ||
27 | 21 | ||
28 | rssbot: | 22 | rssbot: |
29 | build: | 23 | build: |