feat: add CloudWatch compose logging overlay#162
Open
i-am-thor[bot] wants to merge 1 commit into
Open
Conversation
Co-authored-by: Thong Nguyen DT <thong.dnguyen@katalon.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an opt-in Docker Compose overlay to ship container logs to AWS CloudWatch Logs, and documents the required environment variables and operator setup in the repo’s deployment docs.
Changes:
- Added
docker-compose.cloudwatch.ymloverlay that configures the Dockerawslogslogging driver for all services. - Documented CloudWatch overlay env vars and usage in
README.md. - Added commented CloudWatch overlay env vars to
.env.example.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| README.md | Documents CloudWatch overlay env vars and the operational requirements/usage. |
| docker-compose.cloudwatch.yml | New compose overlay configuring awslogs driver per service. |
| .env.example | Adds example CloudWatch overlay env vars (commented) for deployments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+21
to
+91
| awslogs-stream: remote-cli | ||
|
|
||
| grafana-mcp: | ||
| logging: | ||
| <<: *cloudwatch-logging | ||
| options: | ||
| <<: *cloudwatch-logging-options | ||
| awslogs-stream: grafana-mcp | ||
|
|
||
| mitmproxy: | ||
| logging: | ||
| <<: *cloudwatch-logging | ||
| options: | ||
| <<: *cloudwatch-logging-options | ||
| awslogs-stream: mitmproxy | ||
|
|
||
| codex-lb: | ||
| logging: | ||
| <<: *cloudwatch-logging | ||
| options: | ||
| <<: *cloudwatch-logging-options | ||
| awslogs-stream: codex-lb | ||
|
|
||
| opencode: | ||
| logging: | ||
| <<: *cloudwatch-logging | ||
| options: | ||
| <<: *cloudwatch-logging-options | ||
| awslogs-stream: opencode | ||
|
|
||
| runner: | ||
| logging: | ||
| <<: *cloudwatch-logging | ||
| options: | ||
| <<: *cloudwatch-logging-options | ||
| awslogs-stream: runner | ||
|
|
||
| gateway: | ||
| logging: | ||
| <<: *cloudwatch-logging | ||
| options: | ||
| <<: *cloudwatch-logging-options | ||
| awslogs-stream: gateway | ||
|
|
||
| cron: | ||
| logging: | ||
| <<: *cloudwatch-logging | ||
| options: | ||
| <<: *cloudwatch-logging-options | ||
| awslogs-stream: cron | ||
|
|
||
| admin: | ||
| logging: | ||
| <<: *cloudwatch-logging | ||
| options: | ||
| <<: *cloudwatch-logging-options | ||
| awslogs-stream: admin | ||
|
|
||
| vouch: | ||
| logging: | ||
| <<: *cloudwatch-logging | ||
| options: | ||
| <<: *cloudwatch-logging-options | ||
| awslogs-stream: vouch | ||
|
|
||
| ingress: | ||
| logging: | ||
| <<: *cloudwatch-logging | ||
| options: | ||
| <<: *cloudwatch-logging-options | ||
| awslogs-stream: ingress |
Comment on lines
102
to
109
| | Variable | Required | Service | Purpose | | ||
| | ------------------------------- | -------- | ------------------------- | ---------------------------------------------------------------------------------------------------- | | ||
| | `CRON_SECRET` | Yes | `gateway`, `cron` | Shared secret for cron endpoint auth | | ||
| | `THOR_ADMIN_EMAILS` | Yes | `ingress` | Comma-separated authenticated Google emails allowed for OpenCode-backed and `/admin/` ingress routes | | ||
| | `THOR_INTERNAL_SECRET` | Yes | `remote-cli`, `gateway` | Secret-gates gateway↔remote-cli internal APIs | | ||
| | `THOR_CLOUDWATCH_LOG_GROUP` | Overlay | `compose` | Shared CloudWatch Logs group used by `docker-compose.cloudwatch.yml` | | ||
| | `THOR_CLOUDWATCH_LOG_REGION` | Overlay | `compose` | AWS region for CloudWatch Logs when using `docker-compose.cloudwatch.yml` | | ||
| | `THOR_E2E_TEST_HELPERS` | No | `runner` | Enables secret-gated deterministic runner e2e helpers | |
| - Repos under `/workspace/repos` are mounted read-only into OpenCode. Thor creates edits in `/workspace/worktrees`. | ||
| - OpenCode and remote-cli share the same `/tmp` volume so temporary artifacts referenced by absolute path, such as `slack-post-message --blocks-file /tmp/...`, are readable by the posting service. | ||
| - Scheduled prompts live in `docker-volumes/workspace/cron/crontab`. | ||
| - CloudWatch logging is opt-in via `docker compose -f docker-compose.yml -f docker-compose.cloudwatch.yml up --build -d`. The overlay sends every service to one shared log group with a static stream per service. The host must support Docker's `awslogs` driver and have an EC2 instance profile or AWS credentials with `logs:CreateLogGroup`, `logs:CreateLogStream`, `logs:PutLogEvents`, and `logs:DescribeLogStreams` for the selected region/log group. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
docker-compose.cloudwatch.ymloverlay for CloudWatch log shippingTesting
AI-generated — verify before acting. View Thor context