aws-samples / aws-samples/sample-agentic-platform
bug: `make dev:deps` fails on a clean checkout: stale Dockerfile path, wrong port mapping, and undocumented root `.env` requirement
- Dominant language
- Python
- Stars
- 133
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
The Local Development Quickstart in `README.md` cannot be completed on a clean checkout. `make dev:deps` fails twice for unrelated reasons, and the root `.env` file it depends on is not documented or templated anywhere in the repository.
## Version
- Commit: `e41eca1` (`main`, 2026-06-17)
- Docker 29.7.2, Docker Compose 5.4.0, macOS arm64
- No local modifications
## Reproduction
Follow the Local Development Quickstart in `README.md` exactly:
```bash
git clone https://github.com/aws-samples/sample-agentic-platform.git
cd sample-agentic-platform
uv sync
make dev:deps
```
## Problem 1: `.env` is required but undocumented
```text
env file /path/to/sample-agentic-platform/.env not found
```
`docker-compose.yaml` declares `env_file: - .env` for both the `litellm` and `memory-gateway` services, and interpolates `${LITELLM_MASTER_KEY}` and `${LITELLM_DATABASE_URL}`. No `.env` exists on a fresh clone, `.env` is gitignored, and there is no `.env.example` to copy.
Nothing documents the requirement. `README.md` presents `make dev:deps` as a standalone step. `DEPLOYMENT.md` says "For local development, use the provided Docker Compose setup" followed by `docker compose up`. `AGENTS.md` documents the per-agent `.env` files under `src/agentic_platform/agent/*/` but never the root one.
The required variables are discoverable only by reading the source. `DatabaseConfig.__post_init__` in `src/agentic_platform/core/db/postgres.py` raises unless all six of `PG_DATABASE`, `PG_CONNECTION_URL`, `PG_USER`, `PG_PASSWORD`, `PG_READ_ONLY_USER`, and `PG_READ_ONLY_PASSWORD` are set when `ENVIRONMENT=local`. `MemoryClient._get_provider` in `src/agentic_platform/service/memory_gateway/client/memory/memory_client.py` raises unless `MEMORY_PROVIDER` is set, and the valid values (`bedrock_agentcore` or `postgres`) are documented only in a comment in `k8s/helm/values/applications/memory-gateway-values.yaml`.
## Problem 2: `docker-compose.yaml` builds from a deleted path
After supplying a `.env`, the build fails:
```text
resolve : lstat /path/to/sample-agentic-platform/docker: no such file or directory
```
The `memory-gateway` service builds from `docker/memory-gateway/Dockerfile`. Commit `ad3a286` (2025-10-15, "Refactor: Pushing the dockerfiles into the source directory to keep things together & make building and deploying the agents on agentcore simpler") deleted `docker/memory-gateway/` and moved the Dockerfile to `src/agentic_platform/service/memory_gateway/Dockerfile`, but did not update `docker-compose.yaml`. The `docker/` directory no longer exists at all.
`deploy/build-container.sh` was updated for the move and checks the `src/` path first with a fallback to `docker/`, so the breakage is isolated to Compose.
## Problem 3: `memory-gateway` port mapping does not match the Dockerfile
`docker-compose.yaml` maps `4001:8000`, but `src/agentic_platform/service/memory_gateway/Dockerfile` declares `EXPOSE 8080` and runs `uvicorn --port 8080`. The container is unreachable on the published port.
The same correction was already applied to Kubernetes. `k8s/helm/values/applications/memory-gateway-values.yaml` carries the comment "had to change port value from 8000 to 8080 to match Dockerfile" on its `targetPort`. Compose was missed.
## Suggested fix
```diff
- dockerfile: docker/memory-gateway/Dockerfile
+ dockerfile: src/agentic_platform/service/memory_gateway/Dockerfile
ports:
- - "4001:8000"
+ - "4001:8080"
```
Add a committed `.env.example` documenting the required variables with working local defaults matching the `postgres` service credentials in `docker-compose.yaml`, and reference it from the README quickstart:
```diff
+# Create local environment file
+cp .env.example .env
+
# Start supporting services (Postgres, Redis, LiteLLM, Memory Gateway)
make dev:deps
```
## Verification
With those changes all four services start and respond:
```text
postgres 5432 psql select 1 -> ok
redis 6379 running
litellm 4000 /health/liveliness -> "I'm alive!"
memory-gateway 4001 /health -> {"status":"healthy"}
```
## Impact
The documented quickstart is the entry point for new contributors and fails at its second command, with no error message pointing to the cause.
Contributor guide
Research direction
Start with docker-compose.yaml, src/agentic_platform/service/memory_gateway/Dockerfile, and the Local Development Quickstart in README.md; compare the Compose build path and port with the Dockerfile, then review the required root environment variables described in the issue. Add the documented environment template and quickstart step, update the Compose configuration, and run make dev:deps to verify all four services start and the listed health checks respond.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, python
- Domain
- devops, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100