docs: Update README and example.tfvars to reflect current implementation and fix Docker container role separation #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR addresses inconsistencies between the documentation and actual implementation following the recent ECS architecture changes in #7. The changes ensure that README.md and example.tfvars accurately reflect the current infrastructure, and fixes a critical bug in the Docker container role separation.
Problems Addressed
1. Undocumented Three-Service ECS Architecture
The recent addition of separate queue-worker and scheduler services was not documented. Users following the README would not understand that three separate ECS services are deployed:
Fixed by:
2. Redis Configuration Inconsistency
The
redis_num_cache_nodesvariable was defined in bothvariables.tfandexample.tfvars, suggesting it could be configured, but it was never actually used in the code. The cache module hardcodesnum_cache_nodes = 1.Fixed by:
variables.tfexample.tfvarswith a clear note3. Critical Docker Container Role Bug
The Docker entrypoint script was not using the
CONTAINER_ROLEenvironment variable to select the appropriate supervisord configuration. This meant all three service configurations (nginx+php-fpm, queue-worker, and scheduler) would attempt to start in every container, which could cause:Fixed by:
entrypoint.shto select the correct supervisord config based onCONTAINER_ROLE[supervisord]section to all role-specific supervisor configs4. Missing Configuration Variables
Several variables were missing or inconsistent:
github_orgwas required but missing from README examplesmin_capacityandmax_capacitywere mentioned but not in minimal config examplesaws_regionhad a default but wasn't documented in example.tfvarsdmarc_recordexisted but wasn't documentedFixed by:
5. VPN Certificates Auto-Provisioning
VPN server certificates are always created via ACM (even when Client VPN is disabled), but this wasn't documented, potentially causing confusion about the certificate ARN output.
Fixed by:
Changes Made
Documentation (
README.md)Configuration (
terraform/environments/example.tfvars)redis_num_cache_nodesconfigurationTerraform (
terraform/variables.tf,terraform/outputs.tf)redis_num_cache_nodesvariableDocker (
docker/*)CONTAINER_ROLEenvironment variable[supervisord]section to all role-specific configsValidation
terraform validateBreaking Changes
None. These changes only fix documentation and a bug that would have caused issues in production.
Testing Recommendations
For deployments using this updated version:
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
checkpoint-api.hashicorp.comterraform version(dns block)terraform init -backend=false(dns block)terraform validate(dns block)esm.ubuntu.com/usr/lib/apt/methods/https(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.