# Local testing compose file - uses relative paths and build contexts # Usage: docker compose -f docker-compose.test.yaml up --build services: backend: build: context: . dockerfile: Dockerfile.backend.prod container_name: itam-backend-test working_dir: /app env_file: - .env environment: NODE_ENV: development PORT: 3000 DB_HOST: ${DB_HOST:-172.16.8.151} DB_PORT: ${DB_PORT:-3306} DB_USER: ${DB_USER:-root} DB_PASS: ${DB_PASS:-} DB_NAME: ${DB_NAME:-itam} ports: - "3000:3000" volumes: - ./uploads:/app/uploads - ./map_config.json:/app/map_config.json:ro restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s frontend: build: context: . dockerfile: Dockerfile.frontend.prod container_name: itam-frontend-test expose: - "80" restart: unless-stopped nginx: image: nginx:stable-alpine container_name: itam-nginx-test ports: - "8080:80" volumes: - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro - ./logs/nginx:/var/log/nginx depends_on: backend: condition: service_healthy frontend: condition: service_started restart: unless-stopped healthcheck: test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:80/"] interval: 30s timeout: 10s retries: 3 start_period: 20s