Skip to content

Commit 8323225

Browse files
usnavy13claude
andcommitted
chore: Consolidate compose files, update docs for S3/Garage, remove stale files
The repo had unnecessary docker-compose.prod.yml and docker-compose.local-test.yml files. docker-compose.yml is now the single production-ready base (pulls published GHCR image by default), and docker-compose.override.example.yml handles local dev overrides. All MinIO references across 10+ docs updated to S3/Garage to match the migration completed in #90. Removed stale Reference/ directory and placeholder AGENTS.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e109628 commit 8323225

19 files changed

Lines changed: 212 additions & 1885 deletions

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ S3_SECRET_KEY=minioadminsecret
5858
# PORT=8000 # External host port published by docker compose
5959

6060
# ── SSL/HTTPS ──────────────────────────────────────────────────
61-
# HTTPS works the same with docker-compose.yml and docker-compose.prod.yml:
61+
# HTTPS configuration:
6262
# 1. SSL_CERTS_PATH is a host path mounted to /app/ssl inside the container
6363
# 2. SSL_CERT_FILE and SSL_KEY_FILE must be container paths under /app/ssl
6464
#

AGENTS.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,17 @@ Most users should run the published Docker image from GHCR. You do not need to b
2424
# The default settings work out-of-the-box for local usage
2525
```
2626

27-
3. **Pull and start the published stack**
27+
3. **Pull and start the stack**
2828

2929
```bash
30-
docker compose -f docker-compose.prod.yml pull
31-
docker compose -f docker-compose.prod.yml up -d
30+
docker compose pull
31+
docker compose up -d
3232
```
3333

3434
By default this uses `ghcr.io/usnavy13/librecodeinterpreter:main`. To pin a different published tag:
3535

3636
```bash
37-
API_IMAGE=ghcr.io/usnavy13/librecodeinterpreter:<tag> \
38-
docker compose -f docker-compose.prod.yml up -d
37+
API_IMAGE=ghcr.io/usnavy13/librecodeinterpreter:<tag> docker compose up -d
3938
```
4039

4140
4. **Verify the API**
@@ -47,25 +46,25 @@ Most users should run the published Docker image from GHCR. You do not need to b
4746
The API will be available at `http://localhost:8000`.
4847
Visit `http://localhost:8000/docs` for the interactive API documentation.
4948

50-
To enable HTTPS with either compose file, set `PORT`, `ENABLE_HTTPS`, `SSL_CERTS_PATH`, `SSL_CERT_FILE`, and `SSL_KEY_FILE` in `.env`. `SSL_CERTS_PATH` is the host path mounted into the container at `/app/ssl`, while `SSL_CERT_FILE` and `SSL_KEY_FILE` must point to the certificate files inside the container. See [docs/CONFIGURATION.md](docs/CONFIGURATION.md#sslhttps-configuration).
49+
To enable HTTPS, set `PORT`, `ENABLE_HTTPS`, `SSL_CERTS_PATH`, `SSL_CERT_FILE`, and `SSL_KEY_FILE` in `.env`. `SSL_CERTS_PATH` is the host path mounted into the container at `/app/ssl`, while `SSL_CERT_FILE` and `SSL_KEY_FILE` must point to the certificate files inside the container. See [docs/CONFIGURATION.md](docs/CONFIGURATION.md#sslhttps-configuration).
5150

5251
### Common Consumer Commands
5352

5453
```bash
5554
# View API logs
56-
docker compose -f docker-compose.prod.yml logs -f api
55+
docker compose logs -f api
5756

5857
# Stop the stack
59-
docker compose -f docker-compose.prod.yml down
58+
docker compose down
6059

6160
# Update to the latest published image
62-
docker compose -f docker-compose.prod.yml pull
63-
docker compose -f docker-compose.prod.yml up -d
61+
docker compose pull
62+
docker compose up -d
6463
```
6564

6665
### Published Image Channels
6766

68-
The project now publishes two app-image channels:
67+
The project publishes two app-image channels:
6968

7069
- `ghcr.io/usnavy13/librecodeinterpreter`
7170
- stable branch tags: `main`, `latest`
@@ -74,45 +73,42 @@ The project now publishes two app-image channels:
7473
- development branch tags: `dev`, `latest`
7574
- immutable build tags: `sha-<commit>`
7675

77-
`docker-compose.prod.yml` stays pinned to the stable package by default:
76+
`docker-compose.yml` is pinned to the stable package by default:
7877

7978
```yaml
80-
image: ghcr.io/usnavy13/librecodeinterpreter:main
79+
image: ${API_IMAGE:-ghcr.io/usnavy13/librecodeinterpreter:main}
8180
```
8281
8382
### Use A Local Override File
8483
85-
If you want to pull the current `dev` image or build from your working tree without changing tracked compose files:
84+
If you want to pull the current `dev` image or build from your working tree without changing tracked compose files, use a local override. Compose auto-merges `docker-compose.override.yml` on top of `docker-compose.yml`, so no extra `-f` flags are needed.
8685

8786
1. Copy the example override:
8887

8988
```bash
9089
cp docker-compose.override.example.yml docker-compose.override.yml
9190
```
9291

93-
2. Use it with the production compose stack:
92+
2. Bring the stack up:
9493

9594
```bash
96-
docker compose -f docker-compose.prod.yml -f docker-compose.override.yml pull
97-
docker compose -f docker-compose.prod.yml -f docker-compose.override.yml up -d
95+
docker compose pull
96+
docker compose up -d
9897
```
9998

100-
The checked-in example defaults to `ghcr.io/usnavy13/librecodeinterpreter-dev:latest`.
101-
If you want to build from your local checkout instead, edit `docker-compose.override.yml`
102-
and switch to the commented `build:` block in the example. In that case, skip the
103-
`pull` step and run:
99+
The checked-in example defaults to `ghcr.io/usnavy13/librecodeinterpreter-dev:latest`. To build from your local checkout instead, edit `docker-compose.override.yml` and switch to the commented `build:` block. In that case, skip `pull` and run:
104100

105101
```bash
106-
docker compose -f docker-compose.prod.yml -f docker-compose.override.yml up --build -d
102+
docker compose up --build -d
107103
```
108104

109105
## Build From Source
110106

111-
If you are developing locally or need to customize the image, use the source-backed workflow instead:
107+
If you are developing locally or need to customize the image:
112108

113109
```bash
114110
docker build --target app -t code-interpreter:nsjail .
115-
docker compose up -d
111+
API_IMAGE=code-interpreter:nsjail docker compose up -d
116112
```
117113

118114
The Dockerfile keeps `runtime-core` and `runtime-r` as internal build stages, but only the unified `app` image is published for deployment.
@@ -125,7 +121,7 @@ A built-in admin dashboard is available at `http://localhost:8000/admin-dashboar
125121

126122
- **Overview**: Real-time execution metrics, success rates, and performance graphs
127123
- **API Keys**: Create, view, and manage API keys with rate limiting
128-
- **System Health**: Monitor Redis, MinIO, and sandbox pool status
124+
- **System Health**: Monitor Redis, S3 storage, and sandbox pool status
129125

130126
The dashboard requires the master API key for authentication.
131127

@@ -139,9 +135,9 @@ The dashboard requires the master API key for authentication.
139135
- **Programmatic Tool Calling (PTC)**: Enables AI agents to execute code that invokes external tools mid-execution via `POST /exec/programmatic`, with multi-round continuation support
140136
- **File Management**: Upload, download, and manage files within execution sessions
141137
- **Session Management**: Redis-based session handling with automatic cleanup
142-
- **S3-Compatible Storage**: MinIO integration for persistent file storage
138+
- **S3-Compatible Storage**: Garage (S3-compatible) integration for persistent file storage
143139
- **Authentication**: API key-based authentication for secure access
144-
- **HTTPS/SSL Support**: Optional in-container SSL/TLS termination for both compose workflows
140+
- **HTTPS/SSL Support**: Optional in-container SSL/TLS termination
145141
- **Health Monitoring**: Comprehensive health check endpoints for all dependencies
146142
- **Metrics Collection**: Execution and API metrics for monitoring and debugging
147143
- **Unicode Support**: Full Unicode filename support in file downloads
@@ -187,7 +183,7 @@ The service is highly configurable via environment variables.
187183
| Category | Description |
188184
| ------------- | ------------------------------------------- |
189185
| **API** | Host, port, and security settings. |
190-
| **Storage** | Redis and MinIO/S3 connection details. |
186+
| **Storage** | Redis and S3 (Garage / MinIO / AWS) connection details. |
191187
| **Resources** | Per-execution memory, CPU, and time limits. |
192188
| **Pools** | Sandbox pool sizing and warmup settings. |
193189

@@ -207,11 +203,10 @@ For comprehensive testing details, see [TESTING.md](docs/TESTING.md).
207203

208204
## CI/CD
209205

210-
GitHub Actions is split into three workflows:
206+
GitHub Actions is split into two workflows:
211207

212-
- `ci.yml`: PR validation and required checks
213-
- `release.yml`: publish multi-arch app images for `main`, `dev`, and release tags
214-
- `nightly.yml`: build the app image locally and run slow/full live validation
208+
- `ci.yml`: PR validation — static analysis (flake8, black, mypy, bandit), unit tests, and integration tests
209+
- `release.yml`: publishes multi-arch app images for `main`, `dev`, and release tags
215210

216211
Published images use native `amd64` and `arm64` builds and are exposed as separate stable and dev GHCR packages.
217212

0 commit comments

Comments
 (0)