Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
48 changes: 13 additions & 35 deletions .github/workflows/code-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ on:
required: true
type: choice
options:
- azure-develop
- azure-development
- azure-pro
- azure-production
default: "azure-development"

Expand All @@ -28,7 +30,7 @@ jobs:
deploy:
name: Deploy to Container Apps
runs-on: ubuntu-24.04
environment: ${{ github.event.inputs.ENVIRONMENT && github.event.inputs.ENVIRONMENT || 'azure-development' }}
environment: ${{ github.event.inputs.ENVIRONMENT && github.event.inputs.ENVIRONMENT || 'azure-develop' }}
env:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
Expand All @@ -38,8 +40,8 @@ jobs:
AZURE_ACR_NAME: ${{ vars.AZURE_ACR_NAME }}
AZURE_CONTAINER_ENVIRONMENT_NAME: ${{ vars.AZURE_CONTAINER_ENVIRONMENT_NAME }}
AZURE_RESOURCE_GROUP: ${{ vars.AZURE_RESOURCE_GROUP }}
AZURE_CONTAINER_NAME: "weavejs-frontend"
AZURE_CONTAINER_NAME_BACKEND: "weavejs-backend"
AZURE_CONTAINER_NAME: "frontend"
AZURE_CONTAINER_NAME_BACKEND: "backend"
AZURE_IDENTITY_ID: ${{ secrets.AZURE_IDENTITY_ID }}
NEXT_PUBLIC_API_ENDPOINT: ${{ vars.NEXT_PUBLIC_API_ENDPOINT }}
NEXT_PUBLIC_API_V2_ENDPOINT: ${{ vars.NEXT_PUBLIC_API_V2_ENDPOINT }}
Expand Down Expand Up @@ -99,38 +101,14 @@ jobs:

- name: Deploy
uses: azure/cli@v2
env:
GITHUB_SHA: ${{ github.sha }}
with:
azcliversion: latest
inlineScript: |
az containerapp create \
--name $AZURE_CONTAINER_NAME \
--resource-group $AZURE_RESOURCE_GROUP \
--environment $AZURE_CONTAINER_ENVIRONMENT_NAME \
--image $AZURE_ACR_NAME.azurecr.io/$AZURE_CONTAINER_NAME:${{ github.sha }} \
--target-port 8080 \
--ingress external \
--registry-server $AZURE_ACR_NAME.azurecr.io \
--user-assigned "$AZURE_IDENTITY_ID" \
--registry-identity "$AZURE_IDENTITY_ID" \
--min-replicas 1 \
--max-replicas 2 \
--scale-rule-name http-rule \
--scale-rule-type http \
--scale-rule-http-concurrency 10 \
--query properties.configuration.ingress.fqdn

- name: Add CDN IP Access Restrictions
run: |
echo "Adding CDN IP access restrictions..."
COUNT=1
for IP in $(echo "$CDN_IP_LIST" | tr ',' '\n'); do
echo "Adding IP rule $IP"
az containerapp ingress access-restriction set \
--name $AZURE_CONTAINER_NAME \
--resource-group $AZURE_RESOURCE_GROUP \
--rule-name "rule-$COUNT" \
--ip-address $IP \
--description "IP allow $COUNT" \
--action Allow
((COUNT++))
done
az containerapp update \
--name $AZURE_CONTAINER_NAME \
--resource-group $AZURE_RESOURCE_GROUP \
--image $AZURE_ACR_NAME.azurecr.io/$AZURE_CONTAINER_NAME:$GITHUB_SHA \
--revision-suffix $GITHUB_SHA \
--query properties.configuration.ingress.fqdn
5 changes: 4 additions & 1 deletion code/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,7 @@ yarn-error.log*
next-env.d.ts

.npmrc
certificates
certificates

server.cert
server.key
12 changes: 12 additions & 0 deletions code/app/v1/liveness/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// SPDX-FileCopyrightText: 2025 2025 INDUSTRIA DE DISEÑO TEXTIL S.A. (INDITEX S.A.)
//
// SPDX-License-Identifier: Apache-2.0

export async function GET() {
return Response.json(
{ status: "OK" },
{
status: 200,
}
);
}
12 changes: 12 additions & 0 deletions code/app/v1/readiness/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// SPDX-FileCopyrightText: 2025 2025 INDUSTRIA DE DISEÑO TEXTIL S.A. (INDITEX S.A.)
//
// SPDX-License-Identifier: Apache-2.0

export async function GET() {
return Response.json(
{ status: "OK" },
{
status: 200,
}
);
}
12 changes: 12 additions & 0 deletions code/app/v1/startup/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// SPDX-FileCopyrightText: 2025 2025 INDUSTRIA DE DISEÑO TEXTIL S.A. (INDITEX S.A.)
//
// SPDX-License-Identifier: Apache-2.0

export async function GET() {
return Response.json(
{ status: "OK" },
{
status: 200,
}
);
}
3 changes: 3 additions & 0 deletions code/components/actions/images-tool/images-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export class ImagesToolAction extends WeaveAction {
};

this.preloadImgs[imageId] = new Image();
this.preloadImgs[imageId].crossOrigin = "anonymous";
this.preloadImgs[imageId].onerror = () => {
this.instance.emitEvent<ImagesToolActionOnEndLoadImageEvent>(
"onImageLoadEnd",
Expand All @@ -148,6 +149,8 @@ export class ImagesToolAction extends WeaveAction {
this.instance.emitEvent("imageLoaded");
};

console.log("Loading image", this.preloadImgs[imageId]);

this.preloadImgs[imageId].src = imageURL;
}

Expand Down
131 changes: 0 additions & 131 deletions code/components/home-components/home-showcase-animation.tsx

This file was deleted.

Loading
Loading