Skip to content

feat: add CloudWatch compose logging overlay#162

Open
i-am-thor[bot] wants to merge 1 commit into
deploy/thor.withkatalon.comfrom
feat/cloudwatch-logging
Open

feat: add CloudWatch compose logging overlay#162
i-am-thor[bot] wants to merge 1 commit into
deploy/thor.withkatalon.comfrom
feat/cloudwatch-logging

Conversation

@i-am-thor
Copy link
Copy Markdown
Contributor

@i-am-thor i-am-thor Bot commented May 27, 2026

Summary

  • add an opt-in docker-compose.cloudwatch.yml overlay for CloudWatch log shipping
  • configure one shared log group with one static stream per service
  • document the overlay env vars, deploy command, and required AWS/Docker permissions

Testing

  • docker compose config --no-interpolate
  • THOR_CLOUDWATCH_LOG_GROUP=/thor/test THOR_CLOUDWATCH_LOG_REGION=us-east-1 docker compose -f docker-compose.yml -f docker-compose.cloudwatch.yml config --format json
  • GitHub Actions: Unit Tests
  • GitHub Actions: Core E2E (manual dispatch)

AI-generated — verify before acting. View Thor context

Co-authored-by: Thong Nguyen DT <thong.dnguyen@katalon.com>
@daohoangson daohoangson changed the base branch from main to deploy/thor.withkatalon.com May 27, 2026 07:49
@daohoangson daohoangson changed the base branch from deploy/thor.withkatalon.com to main May 27, 2026 07:50
@daohoangson daohoangson changed the base branch from main to deploy/thor.withkatalon.com May 27, 2026 07:53
@daohoangson daohoangson requested a review from Copilot May 27, 2026 09:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml overlay that configures the Docker awslogs logging 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 thread README.md
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 |
Comment thread README.md
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant