Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
c772dbb
Merge pull request #220 from IDinsight/staging
Jayprakash-SE Jun 5, 2024
33822af
Merge pull request #223 from IDinsight/staging
Jayprakash-SE Jun 5, 2024
414a6e4
Merge pull request #239 from IDinsight/dev
Jayprakash-SE Jul 26, 2024
c6f652f
Merge pull request #243 from IDinsight/dev
Jayprakash-SE Jul 26, 2024
c63c1e3
Merge pull request #244 from IDinsight/staging
Jayprakash-SE Jul 31, 2024
7f71409
Merge pull request #265 from IDinsight/dev
Jayprakash-SE Sep 27, 2024
61d74e8
Merge pull request #267 from IDinsight/dev
Jayprakash-SE Sep 27, 2024
03a4497
Merge pull request #270 from IDinsight/dev
Jayprakash-SE Sep 27, 2024
fda943b
Merge pull request #277 from IDinsight/dev
Jayprakash-SE Oct 18, 2024
545c952
Merge pull request #280 from IDinsight/dev
Jayprakash-SE Oct 24, 2024
75877bc
Merge pull request #282 from IDinsight/dev
utkarsh14 Oct 28, 2024
205f7f3
Merge pull request #283 from IDinsight/staging
Jayprakash-SE Oct 29, 2024
d44c8d8
Merge pull request #299 from IDinsight/dev
jeenut27 Dec 10, 2024
e90e643
Merge pull request #311 from IDinsight/dev
jeenut27 Jan 8, 2025
fb84957
Merge pull request #313 from IDinsight/dev
jeenut27 Jan 8, 2025
3a0adb4
Merge pull request #316 from IDinsight/dev
jeenut27 Jan 15, 2025
f0d74cb
Merge pull request #319 from IDinsight/staging
jeenut27 Jan 20, 2025
97db271
Merge pull request #331 from IDinsight/dev
jeenut27 Feb 17, 2025
15c914f
Merge pull request #334 from IDinsight/dev
jeenut27 Feb 18, 2025
af26c5b
Merge pull request #332 from IDinsight/staging
jeenut27 Feb 18, 2025
e1dfa60
Merge pull request #341 from IDinsight/dev
jeenut27 Mar 27, 2025
792de04
Merge pull request #356 from IDinsight/dev
utkarsh14 May 27, 2025
a480187
Merge pull request #359 from IDinsight/dev
utkarsh14 May 29, 2025
47249d9
Merge pull request #360 from IDinsight/staging
utkarsh14 Jun 2, 2025
60134a9
Prepare for staging release v2.5.0-stg (#364)
jeenut27 Jun 17, 2025
9a6e91e
Merge pull request #365 from IDinsight/staging
jeenut27 Jun 17, 2025
6637396
Merge pull request #373 from IDinsight/dev
utkarsh14 Aug 1, 2025
7d80cf3
Merge pull request #374 from IDinsight/staging
utkarsh14 Aug 1, 2025
4fa7378
Prepare for staging release v2.6.1-stg (#379)
utkarsh14 Aug 9, 2025
33baaa9
Merge pull request #380 from IDinsight/staging
utkarsh14 Aug 9, 2025
1e77088
Merge pull request #382 from IDinsight/dev
utkarsh14 Aug 14, 2025
25e70fd
Merge pull request #383 from IDinsight/dev
utkarsh14 Aug 14, 2025
dfa8880
Backend Horizontal scaling using ECS Service delivery
utkarsh14 Aug 15, 2025
46c549c
Merge pull request #384 from IDinsight/horizontal_scaling
utkarsh14 Aug 15, 2025
9023376
DQ Hotfix : Remove Bulk check API
utkarsh14 Aug 18, 2025
1f1a343
Merge pull request #385 from IDinsight/dq_hotfix
utkarsh14 Aug 18, 2025
380b97e
Add Horizontal scaling nginx changes to prod
utkarsh14 Aug 19, 2025
c037405
Merge pull request #386 from IDinsight/horizontal_scaling
utkarsh14 Aug 19, 2025
9301b81
Revert Horizontal scaling changes for production
utkarsh14 Aug 19, 2025
5e4f57c
Merge pull request #387 from IDinsight/horizontal_scaling
utkarsh14 Aug 19, 2025
f69cf11
Merge pull request #389 from IDinsight/dev
jeenut27 Aug 21, 2025
2766810
Revert "Revert Horizontal scaling changes for production"
utkarsh14 Aug 22, 2025
a4737ad
Merge pull request #390 from IDinsight/horizontal_scaling
utkarsh14 Aug 22, 2025
cc262fe
Change to ALB based horizontal scaling
utkarsh14 Aug 28, 2025
8a6328b
Merge pull request #392 from IDinsight/horizontal_scaling
utkarsh14 Aug 28, 2025
66e95a7
Fix ALB Base url
utkarsh14 Aug 28, 2025
08098df
Merge pull request #393 from IDinsight/horizontal_scaling
utkarsh14 Aug 28, 2025
41dc57a
Add template for staging nginx
utkarsh14 Aug 28, 2025
b83a83f
Merge pull request #394 from IDinsight/horizontal_scaling
utkarsh14 Aug 28, 2025
50e8eaf
Merge pull request #395 from IDinsight/dev
utkarsh14 Sep 19, 2025
3ea2031
Merge branch 'production' into staging_fixes
utkarsh14 Oct 16, 2025
c344f8f
Merge pull request #396 from IDinsight/staging_fixes
utkarsh14 Oct 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
ECR_REPOSITORY: web-callisto-ecr-repository
IMAGE_TAG: frontend
run: |
docker build -f Dockerfile.client --build-arg BUILD_ENV=${{ env.STAGING_BUILD_ENV }} --rm --platform=linux/amd64 -t ${{ env.FRONTEND_NAME }}:${{ env.VERSION }} .
docker build -f Dockerfile.staging.client --build-arg BUILD_ENV=${{ env.STAGING_BUILD_ENV }} --rm --platform=linux/amd64 -t ${{ env.FRONTEND_NAME }}:${{ env.VERSION }} .
docker tag ${{ env.FRONTEND_NAME }}:${{ env.VERSION }} $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
ECR_REPOSITORY: web-callisto-ecr-repository
IMAGE_TAG: frontend
run: |
docker build -f Dockerfile.client --build-arg BUILD_ENV=${{ env.PROD_BUILD_ENV }} --rm --platform=linux/amd64 -t ${{ env.FRONTEND_NAME }}:${{ env.VERSION }} .
docker build -f Dockerfile.staging.client --build-arg BUILD_ENV=${{ env.PROD_BUILD_ENV }} --rm --platform=linux/amd64 -t ${{ env.FRONTEND_NAME }}:${{ env.VERSION }} .
docker tag ${{ env.FRONTEND_NAME }}:${{ env.VERSION }} $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
Expand Down
28 changes: 28 additions & 0 deletions Dockerfile.staging.client
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# DESCRIPTION: Dockerfile for surveystream_frontend react app

# Build step #1: build the React front end
FROM node:16-alpine as build-step
ARG BUILD_ENV

WORKDIR /
ENV PATH /node_modules/.bin:$PATH

COPY package.json tailwind.config.js /tsconfig.json ./
RUN npm install --network-timeout=100000
RUN npx browserslist@latest --update-db

# Copying source code later so that we can avoid npm install everytime
COPY src src
COPY public public
COPY .env.${BUILD_ENV} .env.${BUILD_ENV}
RUN npm run build:${BUILD_ENV}

# Build step #2: build an nginx container
FROM nginx:stable-alpine
COPY --from=build-step /build /usr/share/nginx/html
# Copy the nginx config template
COPY ./nginx.staging.conf.template /etc/nginx/conf.d/default.conf.template
# Install envsubst for variable substitution
RUN apk add --no-cache gettext
# Entrypoint to substitute env vars and start nginx
CMD envsubst '$ALB_BASE_URL' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'
36 changes: 36 additions & 0 deletions nginx.staging.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
server {
listen 80;
server_name localhost;

root /usr/share/nginx/html;
index index.html;
error_page 500 502 503 504 /50x.html;

gzip on;
gzip_disable "msie6";
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types text/plain application/json text/html text/css text/javascript;

proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
client_max_body_size 80m;

location / {
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache";
}

location /static {
expires 1y;
add_header Cache-Control "public";
}

location /api {
proxy_pass http://${ALB_BASE_URL};
}
}
36 changes: 36 additions & 0 deletions nginx.staging.conf.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
server {
listen 80;
server_name localhost;

root /usr/share/nginx/html;
index index.html;
error_page 500 502 503 504 /50x.html;

gzip on;
gzip_disable "msie6";
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types text/plain application/json text/html text/css text/javascript;

proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
client_max_body_size 80m;

location / {
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache";
}

location /static {
expires 1y;
add_header Cache-Control "public";
}

location /api {
proxy_pass http://$ALB_BASE_URL;
}
}
48 changes: 13 additions & 35 deletions src/modules/DQ/DQChecks/DQCheckGroup1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import {
fetchModuleName,
getDQChecks,
postDQChecks,
postDQChecksBulk,
putDQChecks,
} from "../../../redux/dqChecks/apiService";
import { getDQConfig } from "../../../redux/dqChecks/dqChecksActions";
Expand Down Expand Up @@ -479,41 +478,20 @@ function DQCheckGroup1({ surveyUID, formUID, typeID }: IDQCheckGroup1Props) {
});
} else {
setLoading(true);
if (
data.variable_name &&
Array.isArray(data.variable_name) &&
data.variable_name.length > 1
) {
postDQChecksBulk(formUID, typeID, formData).then((res: any) => {
if (res?.data?.success) {
closeAddManualDrawer();
message.success("DQ checks added successfully", 1, () => {
loadDQChecks();
setDataLoading(true);
setSelectedVariableRows([]);
setLoading(false);
});
} else {
message.error("Failed to add DQ Checks");
setLoading(false);
}
});
} else {
postDQChecks(formUID, typeID, formData).then((res: any) => {
if (res?.data?.success) {
closeAddManualDrawer();
message.success("DQ added successfully", 1, () => {
loadDQChecks();
setDataLoading(true);
setSelectedVariableRows([]);
setLoading(false);
});
} else {
message.error("Failed to add DQ Check");
postDQChecks(formUID, typeID, formData).then((res: any) => {
if (res?.data?.success) {
closeAddManualDrawer();
message.success("DQ added successfully", 1, () => {
loadDQChecks();
setDataLoading(true);
setSelectedVariableRows([]);
setLoading(false);
}
});
}
});
} else {
message.error("Failed to add DQ Check");
setLoading(false);
}
});
}
};

Expand Down
48 changes: 13 additions & 35 deletions src/modules/DQ/DQChecks/DQCheckGroup2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
fetchModuleName,
getDQChecks,
postDQChecks,
postDQChecksBulk,
putDQChecks,
} from "../../../redux/dqChecks/apiService";
import { getDQConfig } from "../../../redux/dqChecks/dqChecksActions";
Expand Down Expand Up @@ -387,41 +386,20 @@ function DQCheckGroup2({ surveyUID, formUID, typeID }: IDQCheckGroup1Props) {
});
} else {
setLoading(true);
if (
data.variable_name &&
Array.isArray(data.variable_name) &&
data.variable_name.length > 1
) {
postDQChecksBulk(formUID, typeID, formData).then((res: any) => {
if (res?.data?.success) {
closeAddManualDrawer();
message.success("DQ checks added successfully", 1, () => {
loadDQChecks();
setDataLoading(true);
setSelectedVariableRows([]);
setLoading(false);
});
} else {
message.error("Failed to add DQ Checks");
setLoading(false);
}
});
} else {
postDQChecks(formUID, typeID, formData).then((res: any) => {
if (res?.data?.success) {
closeAddManualDrawer();
message.success("DQ added successfully", 1, () => {
loadDQChecks();
setDataLoading(true);
setSelectedVariableRows([]);
setLoading(false);
});
} else {
message.error("Failed to add DQ Check");
postDQChecks(formUID, typeID, formData).then((res: any) => {
if (res?.data?.success) {
closeAddManualDrawer();
message.success("DQ added successfully", 1, () => {
loadDQChecks();
setDataLoading(true);
setSelectedVariableRows([]);
setLoading(false);
}
});
}
});
} else {
message.error("Failed to add DQ Check");
setLoading(false);
}
});
}
};

Expand Down
48 changes: 13 additions & 35 deletions src/modules/DQ/DQChecks/DQCheckGroup3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
fetchModuleName,
getDQChecks,
postDQChecks,
postDQChecksBulk,
putDQChecks,
} from "../../../redux/dqChecks/apiService";
import { getDQConfig } from "../../../redux/dqChecks/dqChecksActions";
Expand Down Expand Up @@ -376,41 +375,20 @@ function DQCheckGroup3({ surveyUID, formUID, typeID }: IDQCheckGroup3Props) {
});
} else {
setLoading(true);
if (
data.variable_name &&
Array.isArray(data.variable_name) &&
data.variable_name.length > 1
) {
postDQChecksBulk(formUID, typeID, formData).then((res: any) => {
if (res?.data?.success) {
closeAddManualDrawer();
message.success("DQ checks added successfully", 1, () => {
loadDQChecks();
setDataLoading(true);
setSelectedVariableRows([]);
setLoading(false);
});
} else {
message.error("Failed to add DQ Checks");
setLoading(false);
}
});
} else {
postDQChecks(formUID, typeID, formData).then((res: any) => {
if (res?.data?.success) {
closeAddManualDrawer();
message.success("DQ added successfully", 1, () => {
loadDQChecks();
setDataLoading(true);
setSelectedVariableRows([]);
setLoading(false);
});
} else {
message.error("Failed to add DQ Check");
postDQChecks(formUID, typeID, formData).then((res: any) => {
if (res?.data?.success) {
closeAddManualDrawer();
message.success("DQ added successfully", 1, () => {
loadDQChecks();
setDataLoading(true);
setSelectedVariableRows([]);
setLoading(false);
}
});
}
});
} else {
message.error("Failed to add DQ Check");
setLoading(false);
}
});
}
};

Expand Down
28 changes: 0 additions & 28 deletions src/redux/dqChecks/apiService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,33 +126,6 @@ export const postDQChecks = async (
}
};

export const postDQChecksBulk = async (
form_uid: string,
type_id: string,
formData: any
) => {
try {
await getCSRFToken();
const csrfToken = await getCookie("CSRF-TOKEN");
const url = `${API_BASE_URL}/dq/checks_bulk?form_uid=${form_uid}&type_id=${type_id}`;

const res = await axios.post(
url,
{ ...formData },
{
headers: {
"X-CSRF-Token": csrfToken,
"Content-Type": "application/json",
},
withCredentials: true,
}
);
return res;
} catch (error) {
return error;
}
};

export const putDQChecks = async (dq_check_uid: number, formData: any) => {
try {
await getCSRFToken();
Expand Down Expand Up @@ -250,5 +223,4 @@ export const api = {
getDQChecks,
postDQChecks,
deleteDQChecks,
postDQChecksBulk,
};
Loading