From 19afacf190f6aed9dd129cd3827dd1c08462d645 Mon Sep 17 00:00:00 2001 From: Bastian de Byl Date: Sun, 13 Oct 2024 20:19:21 -0400 Subject: [PATCH] noticket - updates for fulfillr --- .../roles/podman/tasks/containers/base/nginx.yml | 1 + .../podman/tasks/containers/debyltech/fulfillr.yml | 9 +++++++++ ansible/roles/podman/tasks/main.yml | 2 +- .../podman/templates/fulfillr/production.json.j2 | 14 ++++++++++++-- .../sites/fulfillr.debyltech.com.https.conf.j2 | 9 ++++++++- 5 files changed, 31 insertions(+), 4 deletions(-) diff --git a/ansible/roles/podman/tasks/containers/base/nginx.yml b/ansible/roles/podman/tasks/containers/base/nginx.yml index ef77395..7ba9561 100644 --- a/ansible/roles/podman/tasks/containers/base/nginx.yml +++ b/ansible/roles/podman/tasks/containers/base/nginx.yml @@ -25,6 +25,7 @@ - "{{ nginx_path }}/etc:/etc/nginx:ro" - "/srv/http/letsencrypt:/srv/http/letsencrypt:z" - "/etc/letsencrypt:/etc/letsencrypt:ro" + - "/usr/local/share/fulfillr-site:/usr/local/share/fulfillr-site:ro" - name: create systemd startup job for nginx include_tasks: podman/systemd-generate.yml diff --git a/ansible/roles/podman/tasks/containers/debyltech/fulfillr.yml b/ansible/roles/podman/tasks/containers/debyltech/fulfillr.yml index 1f197db..ffdbcf6 100644 --- a/ansible/roles/podman/tasks/containers/debyltech/fulfillr.yml +++ b/ansible/roles/podman/tasks/containers/debyltech/fulfillr.yml @@ -1,6 +1,15 @@ --- - import_tasks: ecr/podman-ecr-login.yml +- name: create nginx fulfillr-site directory + become: true + ansible.builtin.file: + path: /usr/local/share/fulfillr-site + state: directory + owner: "fedora" + group: "wheel" + mode: 0755 + - name: create fulfillr host directory volumes become: true ansible.builtin.file: diff --git a/ansible/roles/podman/tasks/main.yml b/ansible/roles/podman/tasks/main.yml index c780a3c..2564a86 100644 --- a/ansible/roles/podman/tasks/main.yml +++ b/ansible/roles/podman/tasks/main.yml @@ -64,7 +64,7 @@ - import_tasks: containers/debyltech/fulfillr.yml vars: - image: "{{ aws_ecr_endpoint }}/fulfillr:20241010.1500" + image: "{{ aws_ecr_endpoint }}/fulfillr:20241011.1840" tags: debyltech, fulfillr - import_tasks: containers/home/nosql.yml diff --git a/ansible/roles/podman/templates/fulfillr/production.json.j2 b/ansible/roles/podman/templates/fulfillr/production.json.j2 index ec5270a..ecee40b 100644 --- a/ansible/roles/podman/templates/fulfillr/production.json.j2 +++ b/ansible/roles/podman/templates/fulfillr/production.json.j2 @@ -1,7 +1,6 @@ { "snipcart_api_key": "{{ snipcart_api_key }}", "easypost_api_key": "{{ easypost_api_key }}", - "label_file_type": "PNG", "aws": { "access_key": "{{ fulfillr_access_key }}", "secret_key": "{{ fulfillr_secret_key }}", @@ -11,5 +10,16 @@ "tax": { "ein": "{{ fulfillr_tax_ein }}", "ioss": "{{ fulfillr_tax_ioss }}" - } + }, + "sender_address": { + "city": "Newbury", + "country": "US", + "email": "sales@debyltech.com", + "name": "de Byl Technologies LLC", + "phone": "6034160859", + "state": "NH", + "street1": "976 Route 103", + "street2": "Unit 509", + "zip": "03255" + } } \ No newline at end of file diff --git a/ansible/roles/podman/templates/nginx/sites/fulfillr.debyltech.com.https.conf.j2 b/ansible/roles/podman/templates/nginx/sites/fulfillr.debyltech.com.https.conf.j2 index 99f7b5b..75bf5df 100644 --- a/ansible/roles/podman/templates/nginx/sites/fulfillr.debyltech.com.https.conf.j2 +++ b/ansible/roles/podman/templates/nginx/sites/fulfillr.debyltech.com.https.conf.j2 @@ -34,8 +34,11 @@ server { return 302 $scheme://bdebyl.net$request_uri; } + root /usr/local/share/fulfillr-site; + index index.html; + location /api { - add_header Access-Control-Allow-Origin "$http_origin"; + add_header Access-Control-Allow-Origin * always; add_header Referrer-Policy "same-origin" always; # add_header Strict-Transport-Security "max-age=630720000; includeSubDomains" always; add_header X-Content-Type-Options "nosniff" always; @@ -55,4 +58,8 @@ server { chunked_transfer_encoding off; } + + location / { + try_files $uri $uri/ =404; + } }