From b5cf760779606074a8323789c5d22760c9763f6e Mon Sep 17 00:00:00 2001 From: Raymond Htet Date: Sat, 13 Jul 2024 17:02:58 +0800 Subject: [PATCH] include ngix --- .github/workflows/build.yml | 2 +- default.conf | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 default.conf diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index efe9190..6d3a380 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,7 +56,7 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - name: Build - run: npm run build --if-present + run: npm run build env: NEXT_PUBLIC_COGNITO_CLIENT_ID: ${{ secrets.COGNITO_CLIENT_ID }} NEXT_PUBLIC_QUEMISTRY_GATEWAY_URL: ${{ secrets.QUEMISTRY_GATEWAY_URL }} diff --git a/default.conf b/default.conf new file mode 100644 index 0000000..1ecc51d --- /dev/null +++ b/default.conf @@ -0,0 +1,15 @@ +server { + listen 80; + server_name localhost; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri $uri/ /index.html; + } + + location /api/ { + proxy_pass http://127.0.0.1:8080; + proxy_set_header Host $host; + } +} \ No newline at end of file