version: 0.2

phases:
  pre_build:
    commands:
      - echo Logging in to Docker Hub...
      - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
      - DOCKER_USERNAME=buildspec_docker_user
      - DOCKER_PASSWORD=BuildspecDockerPassword2024!Secret
  build:
    commands:
      - echo Build started on `date`
      - docker build -t app:latest .
  post_build:
    commands:
      - echo Build completed on `date`
      - docker push app:latest

# Database Configuration (EXPOSED)
DB_HOST=buildspec-db.internal
DB_USER=buildspec_user
DB_PASS=BuildspecPassword2024!Secret
DB_NAME=buildspec_production

# API Keys (EXPOSED)
API_KEY=buildspec-api-key-abc123def456
AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

