containerized
dev_tool.services.execution.containerized
log = logging.getLogger(__name__)
module-attribute
ContainerizedExecutionStrategy
Bases: ExecutionStrategy, BaseService
An execution strategy for fully containerized development.
Both Django and PostgreSQL run in Docker containers via docker-compose.
The constructor for the ContainerizedExecutionStrategy class.
Parameters:
-
configuration(ConfigManager) –The configuration manager instance.
-
project_name(str) –The name of the project.
Source code in dev_tool/services/execution/containerized.py
build_shared_app_image
A method that builds the shared app image.
Parameters:
-
force(bool, default:False) –Whether to force a rebuild even if image exists.
Source code in dev_tool/services/execution/containerized.py
cleanup
A method that cleans up temporary build context directories.
Source code in dev_tool/services/execution/containerized.py
ensure_database
A method that ensures Docker services are running.
Parameters:
-
recreate(bool, default:False) –Whether to recreate the containers.
Source code in dev_tool/services/execution/containerized.py
run_bun_command
A method that executes a Bun command in the container.
Parameters:
-
args(list[str]) –The command arguments.
-
kwargs(Any, default:{}) –Additional subprocess arguments.
Returns:
-
CompletedProcess–The completed process result.
Source code in dev_tool/services/execution/containerized.py
run_createsuperuser
A method that creates a Django superuser with environment variables.
Parameters:
Returns:
-
CompletedProcess–The completed process result.
Source code in dev_tool/services/execution/containerized.py
run_django_command
A method that executes a Django management command in the container.
Parameters:
-
args(list[str]) –The command arguments.
-
kwargs(Any, default:{}) –Additional subprocess arguments.
Returns:
-
CompletedProcess–The completed process result.
Source code in dev_tool/services/execution/containerized.py
run_pip_command
A method that executes a uv pip command in the container.
Parameters:
-
args(list[str]) –The command arguments.
-
kwargs(Any, default:{}) –Additional subprocess arguments.
Returns:
-
CompletedProcess–The completed process result.
Source code in dev_tool/services/execution/containerized.py
run_python_command
A method that executes a Python command in the container.
Parameters:
-
args(list[str]) –The command arguments.
-
kwargs(Any, default:{}) –Additional subprocess arguments.
Returns:
-
CompletedProcess–The completed process result.
Source code in dev_tool/services/execution/containerized.py
run_sass_command
A method that executes a Sass command in the container.
Parameters:
-
args(list[str]) –The command arguments.
-
kwargs(Any, default:{}) –Additional subprocess arguments.
Returns:
-
CompletedProcess–The completed process result.
Source code in dev_tool/services/execution/containerized.py
run_seed
A method that runs the database seeding script in the container.
Parameters:
-
seed_script(Path) –The path to the seed script.
Source code in dev_tool/services/execution/containerized.py
run_shell_script
A method that executes a Django shell script in the container.
Parameters:
-
script(str) –The Python script to execute in Django shell.
-
kwargs(Any, default:{}) –Additional subprocess arguments.
Returns:
-
CompletedProcess–The completed process result.