From a47789600325a4eb19ce963a338cb3db6f7def1e Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Tue, 30 Aug 2022 04:54:21 -0500 Subject: [PATCH] use .j2 --- .../templates/prod.env => prod.env.j2 | 0 roles/azuracast/tasks/install.yml | 2 +- .../templates/azuracast-nginx.conf.j2 | 24 +++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) rename roles/azuracast/templates/prod.env => prod.env.j2 (100%) create mode 100644 roles/azuracast/templates/azuracast-nginx.conf.j2 diff --git a/roles/azuracast/templates/prod.env b/prod.env.j2 similarity index 100% rename from roles/azuracast/templates/prod.env rename to prod.env.j2 diff --git a/roles/azuracast/tasks/install.yml b/roles/azuracast/tasks/install.yml index 1929e6194..5f4e43ff6 100644 --- a/roles/azuracast/tasks/install.yml +++ b/roles/azuracast/tasks/install.yml @@ -5,7 +5,7 @@ - name: AzuraCast - Install {{ azuracast_host_dir }}/.env from template template: - src: prod.j2 + src: prod.env.j2 dest: "{{ azuracast_host_dir }}/.env" #owner: root #group: root diff --git a/roles/azuracast/templates/azuracast-nginx.conf.j2 b/roles/azuracast/templates/azuracast-nginx.conf.j2 new file mode 100644 index 000000000..985f10602 --- /dev/null +++ b/roles/azuracast/templates/azuracast-nginx.conf.j2 @@ -0,0 +1,24 @@ +location /azuracast/ + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Script-Name /azureacast; + proxy_pass http://127.0.0.1:{{ azuracast_http_port }}; +} + +location /radio/ { + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Script-Name /radio; + proxy_pass http://127.0.0.1:{{ azuracast_http_port }}; +} + +# http://box/livres +location {{ calibreweb_url3 }}/ { + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Script-Name {{ calibreweb_url3 }}; + proxy_pass http://127.0.0.1:8083; +}