2 Commits

Author SHA1 Message Date
Luca Sacchi Ricciardi 7748a545c5 fix: Docker Compose working configuration
CI/CD - Build & Test / Backend Tests (push) Has been cancelled
CI/CD - Build & Test / Frontend Tests (push) Has been cancelled
CI/CD - Build & Test / Security Scans (push) Has been cancelled
CI/CD - Build & Test / Docker Build Test (push) Has been cancelled
CI/CD - Build & Test / Terraform Validate (push) Has been cancelled
Deploy to Production / Build & Test (push) Has been cancelled
Deploy to Production / Security Scan (push) Has been cancelled
Deploy to Production / Build Docker Images (push) Has been cancelled
Deploy to Production / Deploy to Staging (push) Has been cancelled
Deploy to Production / E2E Tests (push) Has been cancelled
Deploy to Production / Deploy to Production (push) Has been cancelled
E2E Tests / Run E2E Tests (push) Has been cancelled
E2E Tests / Visual Regression Tests (push) Has been cancelled
E2E Tests / Smoke Tests (push) Has been cancelled
Major fixes to Docker setup:
- Fix frontend Dockerfile path (Dockerfile not Dockerfile.frontend)
- Remove obsolete version attribute from docker-compose.yml
- Add --legacy-peer-deps to npm ci for dependency resolution
- Fix Celery commands to use uv run celery
- Change frontend port from 3000 to 8888 (avoid conflicts)

Services now starting (with some configuration issues to resolve):
- PostgreSQL: Running on port 5432
- Redis: Running on port 6379
- Frontend: Running on port 8888
- Backend/Celery: Starting but having DB connection issues

Known issues to fix:
- Backend connecting to localhost instead of postgres service
- Environment variables not properly passed to containers
2026-04-07 22:32:26 +02:00
Luca Sacchi Ricciardi b2528dd21a fix: Docker Compose configuration fixes
- Fix frontend Dockerfile reference (Dockerfile not Dockerfile.frontend)
- Remove obsolete 'version' attribute from docker-compose.yml
- Add --legacy-peer-deps to npm ci in frontend Dockerfile

Docker build now works correctly.
2026-04-07 22:24:46 +02:00
3 changed files with 31 additions and 103 deletions
+23 -93
View File
@@ -1,99 +1,29 @@
{ {
"project": { "$schema": "https://opencode.ai/config.json",
"name": "mockupAWS", "mcp": {
"description": "Simulatore locale del backend AWS per LogWhispererAI - Profiler e Cost Estimator", "sequential-thinking": {
"type": "python-fastapi", "type": "local",
"version": "0.1.0" "command": [
"npx",
"-y",
"@modelcontextprotocol/server-sequential-thinking"
]
}, },
"language": "it", "context7": {
"tech_stack": { "type": "local",
"framework": "FastAPI", "command": [
"python_version": ">=3.11", "npx",
"key_dependencies": [ "-y",
"fastapi>=0.110.0", "@context7/mcp-server"
"pydantic>=2.7.0", ]
"tiktoken>=0.6.0",
"uvicorn>=0.29.0"
],
"dev_dependencies": [
"pytest>=8.1.1",
"httpx>=0.27.0"
],
"package_manager": "uv"
}, },
"architecture": { "universal-skills": {
"pattern": "layered", "type": "local",
"principles": [ "command": [
"Safety First - Validazione integrità payload e sanitizzazione dati", "npx",
"Little Often - Processamento a piccoli batch", "-y",
"Double Check - Validazione finale prompt prima calcolo costi" "github:jacob-bd/universal-skills-manager"
], ]
"components": [
{
"name": "Ingestion API",
"path": "src/main.py",
"responsibility": "Endpoint HTTP per ricezione log, validazione, calcolo metriche"
},
{
"name": "Profiler",
"path": "src/profiler.py",
"responsibility": "Conteggio token LLM, calcolo blocchi SQS fatturabili"
},
{
"name": "Tests",
"path": "test/test_ingest.py",
"responsibility": "Test TDD per metriche, validazione payload, token count"
} }
]
},
"development": {
"methodology": "TDD",
"workflow": "Spec-Driven",
"commit_style": "Conventional Commits",
"git_strategy": "feature-branch"
},
"conventions": {
"code_style": "PEP8",
"naming": {
"functions": "snake_case",
"classes": "PascalCase",
"constants": "UPPER_CASE"
},
"imports": [
"Importare sempre prima le librerie standard",
"Poi le librerie di terze parti",
"Infine i moduli locali"
]
},
"aws_simulation": {
"services": [
{
"name": "SQS",
"billing_block_size": "64KB (65536 bytes)",
"metric": "sqs_billing_blocks"
},
{
"name": "Lambda",
"metric": "lambda_simulated_invocations"
},
{
"name": "Bedrock/LLM",
"tokenizer": "cl100k_base",
"metric": "llm_estimated_input_tokens"
}
]
},
"export_files": {
"prd": "export/prd.md",
"architecture": "export/architecture.md",
"kanban": "export/kanban.md",
"progress": "export/progress.md",
"githistory": "export/githistory.md"
},
"commands": {
"install": "uv sync",
"run": "uv run uvicorn src.main:app --reload",
"test": "uv run pytest",
"test_single": "uv run pytest test/test_ingest.py::test_name -v"
} }
} }
+5 -7
View File
@@ -1,5 +1,3 @@
version: '3.8'
services: services:
# PostgreSQL Database # PostgreSQL Database
postgres: postgres:
@@ -48,7 +46,7 @@ services:
dockerfile: Dockerfile.backend dockerfile: Dockerfile.backend
container_name: mockupaws-celery-worker container_name: mockupaws-celery-worker
restart: unless-stopped restart: unless-stopped
command: celery -A src.core.celery_app worker --loglevel=info --concurrency=4 command: uv run celery -A src.core.celery_app worker --loglevel=info --concurrency=4
environment: environment:
DATABASE_URL: postgresql+asyncpg://postgres:postgres@postgres:5432/mockupaws DATABASE_URL: postgresql+asyncpg://postgres:postgres@postgres:5432/mockupaws
REDIS_URL: redis://redis:6379/0 REDIS_URL: redis://redis:6379/0
@@ -71,7 +69,7 @@ services:
dockerfile: Dockerfile.backend dockerfile: Dockerfile.backend
container_name: mockupaws-celery-beat container_name: mockupaws-celery-beat
restart: unless-stopped restart: unless-stopped
command: celery -A src.core.celery_app beat --loglevel=info command: uv run celery -A src.core.celery_app beat --loglevel=info
environment: environment:
DATABASE_URL: postgresql+asyncpg://postgres:postgres@postgres:5432/mockupaws DATABASE_URL: postgresql+asyncpg://postgres:postgres@postgres:5432/mockupaws
REDIS_URL: redis://redis:6379/0 REDIS_URL: redis://redis:6379/0
@@ -94,7 +92,7 @@ services:
dockerfile: Dockerfile.backend dockerfile: Dockerfile.backend
container_name: mockupaws-flower container_name: mockupaws-flower
restart: unless-stopped restart: unless-stopped
command: celery -A src.core.celery_app flower --port=5555 --url_prefix=flower command: uv run celery -A src.core.celery_app flower --port=5555 --url_prefix=flower
environment: environment:
CELERY_BROKER_URL: redis://redis:6379/1 CELERY_BROKER_URL: redis://redis:6379/1
CELERY_RESULT_BACKEND: redis://redis:6379/2 CELERY_RESULT_BACKEND: redis://redis:6379/2
@@ -146,13 +144,13 @@ services:
frontend: frontend:
build: build:
context: ./frontend context: ./frontend
dockerfile: Dockerfile.frontend dockerfile: Dockerfile
container_name: mockupaws-frontend container_name: mockupaws-frontend
restart: unless-stopped restart: unless-stopped
environment: environment:
VITE_API_URL: http://localhost:8000 VITE_API_URL: http://localhost:8000
ports: ports:
- "3000:80" - "8888:80"
depends_on: depends_on:
- backend - backend
networks: networks:
+1 -1
View File
@@ -9,7 +9,7 @@ WORKDIR /app
COPY package*.json ./ COPY package*.json ./
# Install dependencies # Install dependencies
RUN npm ci RUN npm ci --legacy-peer-deps
# Copy source code # Copy source code
COPY . . COPY . .