Skip to main content
Chargeworx uses AWS CodeDeploy for automated deployments to Windows Server instances. The platform consists of two main applications:
  • Chargeworx.Api - Payment processing API
  • Chargeworx.Admin - Administrative web interface

Deployment architecture

The deployment process follows these key principles:
  • Automated CI/CD - GitHub Actions workflows trigger builds and deployments
  • Environment-based - Separate configurations for Development, Staging, Alpha, and Production
  • Windows Server - Applications deploy to IIS on Windows Server instances
  • AWS CodeDeploy - Manages deployment lifecycle and rollback capabilities

Deployment workflow

  1. Code push - Developer pushes code to GitHub repository
  2. CI build - GitHub Actions workflow builds and tests the application
  3. Artifact creation - Build artifacts are packaged for deployment
  4. CodeDeploy trigger - Deployment initiated to target environment
  5. Pre-deployment - BeforeInstall hooks stop IIS and prepare environment
  6. File copy - Application files copied to target directory
  7. Post-deployment - AfterInstall hooks start IIS and verify deployment
  8. Health check - Automated health checks verify application status

Deployment targets

Applications deploy to the following directory structure:
D:\APP-CODE\
├── Chargeworx.Api\
└── Chargeworx.Admin\

Environment configuration

Each environment uses specific configuration files:
  • appsettings.Development.json
  • appsettings.Staging.json
  • appsettings.Alpha.json
  • appsettings.Production.json
Configuration includes:
  • Database connection strings
  • Identity Server settings
  • Payment processor credentials
  • AWS service configurations
  • Logging and monitoring settings

Deployment hooks

AWS CodeDeploy uses PowerShell scripts for lifecycle management:
  • before-install.ps1 - Stops IIS application pools and services
  • after-install.ps1 - Starts IIS application pools and verifies deployment

Next steps