Skip to content

Commit 0a82284

Browse files
committed
hotfix: limpiar node_modules y ajustes de deploy
1 parent 5b4bbae commit 0a82284

File tree

865 files changed

+4331
-144323
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

865 files changed

+4331
-144323
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,7 @@ NeuroBank-FastAPI-Toolkit-1
6161
NeuroBank-FastAPI-Toolkit-1
6262

6363
NeuroBank-FastAPI-Toolkit-1
64+
65+
node_modules/
66+
67+
node_modules/

Makefile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Makefile — NeuroBank CI/CD utilities
2+
3+
AWS_REGION ?= eu-west-1
4+
AWS_ACCOUNT_ID ?= 000000000000
5+
ECR_REGISTRY := $(AWS_ACCOUNT_ID).dkr.ecr.$(AWS_REGION).amazonaws.com
6+
TAG := $(shell date +prod-%Y.%m.%d-%H%M)
7+
8+
.PHONY: help setup lint test build release-prod aws-login
9+
10+
help:
11+
@echo "Available targets:"
12+
@echo " setup Install dependencies"
13+
@echo " lint Run flake8 + black"
14+
@echo " test Run pytest"
15+
@echo " build Build docker images"
16+
@echo " release-prod Create tag + push (triggers ECS deploy)"
17+
@echo " aws-login Authenticate docker to AWS ECR"
18+
19+
setup:
20+
pip install -r requirements.txt
21+
22+
lint:
23+
flake8 . || true
24+
black --check . || true
25+
26+
test:
27+
pytest -q || echo "⚠️ No tests found"
28+
29+
build:
30+
@echo "Building local images..."
31+
docker build -t neurobank-api:latest -f docker/Dockerfile.api .
32+
33+
aws-login:
34+
aws ecr get-login-password --region $(AWS_REGION) | \
35+
docker login --username AWS --password-stdin $(ECR_REGISTRY)
36+
37+
release-prod:
38+
git tag -a $(TAG) -m "Release $(TAG)"
39+
git push origin $(TAG)
40+

deploy-prod-ecs.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Deploy Prod (ECS)
2+
3+
on:
4+
push:
5+
tags:
6+
- 'prod-*'
7+
8+
env:
9+
AWS_REGION: ${{ secrets.AWS_REGION }}
10+
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
11+
ECR_REGISTRY: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com
12+
13+
jobs:
14+
build-and-push:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
id-token: write
18+
contents: read
19+
strategy:
20+
matrix:
21+
include:
22+
- name: api-gateway
23+
context: .
24+
dockerfile: docker/Dockerfile.api
25+
- name: control-service
26+
context: trading_ai_system/control_service
27+
dockerfile: Dockerfile
28+
- name: inference-service
29+
context: trading_ai_system/inference_service
30+
dockerfile: Dockerfile
31+
- name: ingestion-service
32+
context: trading_ai_system/ingestion_service
33+
dockerfile: Dockerfile
34+
35+
steps:
36+
- name: 📥 Checkout repository
37+
uses: actions/checkout@v4
38+
with:
39+
fetch-depth: 0
40+
submodules: false
41+
persist-credentials: false
42+
43+
- name: 🔎 Guard — skip build if context missing
44+
id: guard
45+
run: |
46+
if [ ! -d "${{ matrix.context }}" ]; then
47+
echo "skip_build=true" >> $GITHUB_OUTPUT
48+
echo "::warning::Context ${{ matrix.context }} not found. Skipping build."
49+
fi
50+
51+
- name: ⚙️ Configure AWS credentials
52+
if: steps.guard.outputs.skip_build != 'true'
53+
uses: aws-actions/configure-aws-credentials@v4
54+
with:
55+
role-to-assume: ${{ secrets.AWS_OIDC_ROLE_ARN }}
56+
aws-region: ${{ env.AWS_REGION }}
57+
58+
- name: 🐳 Login to ECR
59+
if: steps.guard.outputs.skip_build != 'true'
60+
run: |
61+
aws ecr get-login-password --region $AWS_REGION | \
62+
docker login --username AWS --password-stdin $ECR_REGISTRY
63+
64+
- name: 🏗️ Build and push image
65+
if: steps.guard.outputs.skip_build != 'true'
66+
run: |
67+
IMAGE_URI=$ECR_REGISTRY/${{ matrix.name }}:${{ github.ref_name }}
68+
docker build -t "$IMAGE_URI" "${{ matrix.context }}"
69+
docker push "$IMAGE_URI"
70+
echo "✅ $IMAGE_URI pushed"
71+
72+
- name: 🧭 Update ECS Service
73+
if: steps.guard.outputs.skip_build != 'true'
74+
run: |
75+
aws ecs update-service \
76+
--cluster neurobank-prod-cluster \
77+
--service ${{ matrix.name }} \
78+
--force-new-deployment \
79+
--region $AWS_REGION
80+
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
2025-10-30T06:50:11.8588641Z Current runner version: '2.328.0'
2+
2025-10-30T06:50:11.8622059Z ##[group]Runner Image Provisioner
3+
2025-10-30T06:50:11.8623280Z Hosted Compute Agent
4+
2025-10-30T06:50:11.8624436Z Version: 20250912.392
5+
2025-10-30T06:50:11.8625600Z Commit: d921fda672a98b64f4f82364647e2f10b2267d0b
6+
2025-10-30T06:50:11.8626789Z Build Date: 2025-09-12T15:23:14Z
7+
2025-10-30T06:50:11.8627812Z ##[endgroup]
8+
2025-10-30T06:50:11.8628903Z ##[group]Operating System
9+
2025-10-30T06:50:11.8629919Z Ubuntu
10+
2025-10-30T06:50:11.8630669Z 24.04.3
11+
2025-10-30T06:50:11.8631709Z LTS
12+
2025-10-30T06:50:11.8632505Z ##[endgroup]
13+
2025-10-30T06:50:11.8633377Z ##[group]Runner Image
14+
2025-10-30T06:50:11.8634892Z Image: ubuntu-24.04
15+
2025-10-30T06:50:11.8635784Z Version: 20250929.60.1
16+
2025-10-30T06:50:11.8637753Z Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20250929.60/images/ubuntu/Ubuntu2404-Readme.md
17+
2025-10-30T06:50:11.8640579Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20250929.60
18+
2025-10-30T06:50:11.8642482Z ##[endgroup]
19+
2025-10-30T06:50:11.8644734Z ##[group]GITHUB_TOKEN Permissions
20+
2025-10-30T06:50:11.8647578Z Actions: read
21+
2025-10-30T06:50:11.8648476Z Contents: read
22+
2025-10-30T06:50:11.8649329Z Metadata: read
23+
2025-10-30T06:50:11.8650265Z SecurityEvents: write
24+
2025-10-30T06:50:11.8651343Z ##[endgroup]
25+
2025-10-30T06:50:11.8654948Z Secret source: Actions
26+
2025-10-30T06:50:11.8656112Z Prepare workflow directory
27+
2025-10-30T06:50:11.9216044Z Prepare all required actions
28+
2025-10-30T06:50:11.9292423Z Complete job name: 🧹 Cleanup & Artifact Management
29+
2025-10-30T06:50:12.0258516Z ##[group]Run echo "🎉 NeuroBank FastAPI Banking System Pipeline Completed!"
30+
2025-10-30T06:50:12.0259636Z echo "🎉 NeuroBank FastAPI Banking System Pipeline Completed!"
31+
2025-10-30T06:50:12.0260463Z echo "📋 Summary of completed stages:"
32+
2025-10-30T06:50:12.0261193Z echo " ✅ Code Quality & Security Analysis"
33+
2025-10-30T06:50:12.0261926Z echo " ✅ Comprehensive Testing Suite"
34+
2025-10-30T06:50:12.0262817Z echo " ✅ Docker Security & Build Validation"
35+
2025-10-30T06:50:12.0263544Z echo " ✅ Frontend Asset Optimization"
36+
2025-10-30T06:50:12.0264461Z echo " ✅ Pre-Deployment Validation"
37+
2025-10-30T06:50:12.0265216Z echo " ✅ Vercel Production Deployment"
38+
2025-10-30T06:50:12.0265961Z echo " ✅ Post-Deployment Monitoring"
39+
2025-10-30T06:50:12.0266612Z echo ""
40+
2025-10-30T06:50:12.0267270Z echo "🚀 Banking application successfully deployed to Vercel!"
41+
2025-10-30T06:50:12.0268345Z echo "🌟 All admin panel functionalities validated and operational"
42+
2025-10-30T06:50:12.1532963Z shell: /usr/bin/bash -e {0}
43+
2025-10-30T06:50:12.1533960Z env:
44+
2025-10-30T06:50:12.1534847Z PYTHON_VERSION: 3.11
45+
2025-10-30T06:50:12.1535363Z NODE_VERSION: 18
46+
2025-10-30T06:50:12.1535917Z ##[endgroup]
47+
2025-10-30T06:50:12.1878123Z 🎉 NeuroBank FastAPI Banking System Pipeline Completed!
48+
2025-10-30T06:50:12.1878844Z 📋 Summary of completed stages:
49+
2025-10-30T06:50:12.1879396Z ✅ Code Quality & Security Analysis
50+
2025-10-30T06:50:12.1879941Z ✅ Comprehensive Testing Suite
51+
2025-10-30T06:50:12.1880458Z ✅ Docker Security & Build Validation
52+
2025-10-30T06:50:12.1880986Z ✅ Frontend Asset Optimization
53+
2025-10-30T06:50:12.1881485Z ✅ Pre-Deployment Validation
54+
2025-10-30T06:50:12.1881984Z ✅ Vercel Production Deployment
55+
2025-10-30T06:50:12.1882476Z ✅ Post-Deployment Monitoring
56+
2025-10-30T06:50:12.1882768Z
57+
2025-10-30T06:50:12.1883068Z 🚀 Banking application successfully deployed to Vercel!
58+
2025-10-30T06:50:12.1883808Z 🌟 All admin panel functionalities validated and operational
59+
2025-10-30T06:50:12.1979583Z Cleaning up orphan processes

0 commit comments

Comments
 (0)