Innovatech Chile runs four services wired together by Docker Compose for local development and mirrored on AWS as a 3-tier VPC for production. Understanding how the layers connect — frontend to APIs to database — and how security groups enforce that boundary on AWS is the foundation for working with any part of this platform.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/DevOpsDuoc/Evaluacion02_Devop_Innovatech/llms.txt
Use this file to discover all available pages before exploring further.
Services overview
Ventas API
Spring Boot REST service on port 3001. Manages sales records. Connects to MySQL at
db:3306 via JDBC. Docker service name: backend.Despachos API
Spring Boot REST service on port 3002. Manages dispatch records. Connects to the same MySQL instance at
db:3306. Docker service name: backend-despachos.Frontend
React + Vite application served by NGINX on port 80. Calls the two backend APIs using the environment variables
VITE_API_BASE_URL and VITE_API_DESPACHOS_URL.MySQL DB
MySQL 8.0 on port 3306. Database name
tienda, user tienda. Data is persisted in the named volume tienda_db_data.Docker Compose orchestration
Docker Compose declares all four services and their dependency order indocker-compose.yml. Both backend services must be healthy before the frontend starts, and both backends declare an explicit depends_on: db.
docker-compose.yml
On AWS, the
${AWS_ACCOUNT_ID} variable is resolved at deploy time. The CI/CD pipeline injects this value when pulling images from ECR before running docker compose up -d.AWS 3-tier VPC architecture
The production environment mirrors the same three-layer separation using a dedicated VPC (academy-vpc, CIDR 10.0.0.0/20) across two availability zones (us-east-1a, us-east-1b).
| Tier | Subnet resource | CIDR range | EC2 instance | Internet access |
|---|---|---|---|---|
| Web (public) | aws_subnet.public | 10.0.0.0/24, 10.0.1.0/24 | ec2-web | Direct via IGW |
| App (private) | aws_subnet.private_app | 10.0.2.0/24, 10.0.3.0/24 | ec2-app | Outbound via NAT |
| Data (private) | aws_subnet.private_data | 10.0.4.0/24, 10.0.5.0/24 | ec2-datos | Outbound via NAT |
0.0.0.0/0 to the Internet Gateway (academy-igw). Both private subnet tiers share a private route table that routes outbound traffic through the NAT Gateway, which is deployed in the first public subnet. An S3 Gateway Endpoint is also attached so that S3 traffic bypasses the NAT Gateway entirely.
Security group chaining
Each EC2 tier has its own security group. Ingress rules reference the upstream group by ID rather than by CIDR, so traffic can only flow in the permitted direction:sg_web → sg_app → sg_datos.
sg_weballows inbound HTTP (80), SSH (22), and ICMP from0.0.0.0/0.sg_appallows inbound on ports 3001 and 3002 (Spring Boot), SSH, and ICMP — all restricted tosg_webas the source.sg_datosallows inbound MySQL (3306) fromsg_appand SSH fromsg_web(for Ansible management). ICMP is permitted fromsg_app.
All three security groups allow unrestricted outbound traffic (
0.0.0.0/0). Outbound from the private tiers leaves through the NAT Gateway.End-to-end data flow
Browser request arrives at ec2-web
A user opens the application in their browser. The request reaches
ec2-web in the public subnet on port 80. sg_web permits this inbound HTTP traffic.Frontend calls the backend APIs
The React frontend makes HTTP requests to the Ventas API on port 3001 and the Despachos API on port 3002. In Docker Compose, these are resolved by service name (
backend, backend-despachos). On AWS, the frontend on ec2-web calls ec2-app; sg_app permits these ports only from sg_web.Backend APIs query MySQL
Both Spring Boot services connect to MySQL using the JDBC URL
jdbc:mysql://db:3306/tienda (Docker) or the private IP of ec2-datos (AWS). sg_datos permits port 3306 exclusively from sg_app.