This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ........... | |
| # ============================================ | |
| # Build Profiles Optimization | |
| # ============================================ | |
| [profile.release] | |
| opt-level = 3 # Maximum optimization | |
| lto = "thin" # Thin Link-Time Optimization (faster than "fat", good balance) | |
| codegen-units = 16 # Balance between compile time and runtime performance | |
| strip = true # Strip symbols from binary (smaller size) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ============================================ | |
| # Production-Ready Multi-Stage Dockerfile | |
| # Optimized with sccache for fast compilation | |
| # Based on original architecture + sccache caching | |
| # ============================================ | |
| # ============================================ | |
| # Stage 1: Dependency Builder (Cached Layer) | |
| # ============================================ | |
| FROM rust:1.84-slim-bookworm AS builder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI/CD Pipeline - Deploy to Oracle VPS | |
| on: | |
| pull_request: | |
| branches: | |
| - deploy | |
| types: [closed] | |
| workflow_dispatch: | |
| inputs: | |
| version_type: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ============================================ | |
| # Docker Compose - Production (Oracle VPS) | |
| # ============================================ | |
| # Purpose: Production deployment on Oracle Cloud Infrastructure | |
| # Usage: docker-compose -f docker-compose.prod.yml up -d | |
| # ============================================ | |
| services: | |
| # ============================================ | |
| # Rust Microservice (Production - Pre-built Image) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SOME_CONFIG=config | |
| DATABASE_NAME=TESTMS | |
| DATABASE_HOST=host.docker.internal | |
| DATABASE_USER=root | |
| DATABASE_PSWD=ENNBA | |
| DATABASE_PORT=1021 | |
| MS_PORT=3000 | |
| EXTERNAL_SERVICE_URL=https://dummyjson.com/c/717c-17c6-48b0-b197 | |
| # OpenTelemetry Configuration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ============================================ | |
| # . dockerignore - Optimize Docker Build Context | |
| # ============================================ | |
| # This file tells Docker what NOT to copy into the build context | |
| # Smaller context = faster builds | |
| # ============================================ | |
| # Build artifacts | |
| target/ | |
| **/*.rs.bk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ============================================ | |
| # Production-Ready Multi-Stage Dockerfile | |
| # Works for: Local Development + Oracle VPS Production | |
| # ============================================ | |
| # ============================================ | |
| # Stage 1: Dependency Builder (Cached Layer) | |
| # ============================================ | |
| FROM rust:1.84-slim-bookworm AS builder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ============================================ | |
| # Docker Compose - Local Development | |
| # ============================================ | |
| # Purpose: Local development and testing | |
| # Usage: docker-compose up -d | |
| # ============================================ | |
| services: | |
| # ============================================ | |
| # Rust Microservice (Local Build) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "code": 200, | |
| "message_text": "Ladaradiradadada! !!" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pub fn setup_tracing_with_otel() { | |
| // Initialize OpenTelemetry tracer provider | |
| let tracer_provider = init_telemetry() | |
| .expect("Failed to initialize OpenTelemetry - cannot proceed without telemetry"); | |
| // Get tracer for this service | |
| let tracer = tracer_provider.tracer("excelsior"); | |
| // Create OpenTelemetry tracing layer | |
| let otel_layer = tracing_opentelemetry::layer().with_tracer(tracer); |
NewerOlder