From 0ebbc826886be5ac59a225a6d1b3a3d11adcf7da Mon Sep 17 00:00:00 2001 From: folland87 Date: Thu, 21 Mar 2024 19:04:49 +0100 Subject: [PATCH] workflows#3 --- .github/workflows/staging.yml | 26 +++++++++++++------------- client/nginx.conf | 3 ++- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 248bce5f..30a6127b 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -46,19 +46,19 @@ jobs: IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') docker push --all-tags $IMAGE_ID - # deploy: - # name: Update staging deployment - # runs-on: ubuntu-latest - # needs: publish-ghcr - # steps: - # - name: Deploy to Cluster - # id: kubectl-deploy - # uses: dataesr/kubectl-deploy@v1.1 - # env: - # KUBE_CONFIG: ${{ secrets.KUBE_CONFIG_DOAD }} - # with: - # namespace: ${{ env.DEPLOYMENT_NAMESPACE }} - # restart: ${{ env.DEPLOYMENT }} + deploy: + name: Update staging deployment + runs-on: ubuntu-latest + needs: publish-ghcr + steps: + - name: Deploy to Cluster + id: kubectl-deploy + uses: dataesr/kubectl-deploy@v1.1 + env: + KUBE_CONFIG: ${{ secrets.KUBE_CONFIG_DOAD }} + with: + namespace: ${{ env.DEPLOYMENT_NAMESPACE }} + restart: ${{ env.DEPLOYMENT }} # notify: diff --git a/client/nginx.conf b/client/nginx.conf index 2baa358a..e194e50b 100644 --- a/client/nginx.conf +++ b/client/nginx.conf @@ -6,8 +6,9 @@ server { try_files $uri $uri/ /index.html =404; } location /api { + set $api_key $API_KEY; proxy_pass https://cluster-production.elasticsearch.dataesr.ovh; - proxy_set_header Api-Key ${API_KEY}; + proxy_set_header Authorization Basic $api_key; proxy_set_header Accept application/json; proxy_set_header Content-Type application/json; client_max_body_size 10M;