Lightpress ships with aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/reds-skywalker/Lightpress/llms.txt
Use this file to discover all available pages before exploring further.
scripts/ directory that holds the automation glue between your application code and your AWS infrastructure. Rather than manually running ad-hoc commands, you encode operational tasks — deploying services, checking health, migrating data, generating reports — as versioned, repeatable scripts that anyone on the team can run.
Directory structure
Thescripts/ directory is split by language so that the right tool is always in the right place:
The
scripts/bash/ and scripts/python/ directories exist in the repository as scaffolding. Scripts are added as your operational needs grow — start with the ones most relevant to your current stage.Bash vs Python: when to use each
Choosing the right language for a script keeps your automation maintainable and avoids unnecessary dependencies.Bash
Use Bash for tasks that are primarily shell orchestration: running CLI tools, setting environment variables, chaining AWS CLI commands, and wrapping Docker or
docker compose operations. Bash is ideal when the logic is linear and the main work is delegating to other programs.Python
Use Python when the task involves data structures, AWS SDK calls via
boto3, error handling logic, data transformation, or anything that would be unwieldy as a shell pipeline. Python scripts are also easier to unit-test and better suited for tasks that run as part of CI/CD.awk or sed to parse output, switch to Python.
How scripts integrate with the deployment workflow
Lightpress uses AWS CodeBuild as its CI/CD engine. Thebuildspec.yml at the project root defines the build phases. Scripts in scripts/ are invoked directly from buildspec.yml phases or as pre/post hooks to CloudFormation stack operations.
Scripts can also be run locally for day-to-day operations — log collection, database backups, and ad-hoc AWS queries — without needing to trigger a full pipeline run.
Prerequisites
Before running any script, make sure the following are in place:AWS CLI configured
Install the AWS CLI and configure credentials with sufficient IAM permissions for the operations your scripts perform.
Docker and Docker Compose installed
Bash scripts that manage local services depend on Docker being available in your
PATH.Python environment ready
Python scripts require Python 3.9 or later and a virtual environment with dependencies installed from
scripts/python/requirements.txt. See the Python scripts guide for setup details.Explore the scripts
Bash scripts
Deploy helpers, environment setup, health checks, log collection, and database backup and restore scripts for the AWS and Docker stack.
Python scripts
AWS SDK automation with
boto3, data migration, reporting, and integration testing scripts with full setup instructions.