Files
chroma/docker-compose.yml
Max Isom 3f2d8b134f [BLD]: unify Rust Dockerfiles for faster builds (#4479)
## Description of changes

This PR unifies the 5 separate Rust Dockerfiles into 1. This results in
substantially faster builds as well as being cleaner and easier to
maintain.

After this PR, the old Rust Dockerfiles are no longer used in this repo
but I'm keeping them around until all downstream consumers are updated
to use the new `rust/Dockerfile`.

## Timings

I tested the difference in (local) speed with 3 scenarios. For each one,
I measured the time from the start of the build to when all services in
Tilt were green.

| | before | after | speedup |

|----------------------------------------------------|--------|-------|---------|
| cold `tilt up` | 7m14s | 3m55s | 1.8x |
| new comment in `rust/types/src/api_types.rs` | 2m2s | 58s | 2.1x |
| new comment in `rust/garbage_collector/src/lib.rs` | 37s | 29s | 1.3x
|
2025-05-08 16:04:56 -07:00

40 lines
1.1 KiB
YAML

version: '3.9'
networks:
net:
driver: bridge
services:
server:
image: server
build:
context: .
dockerfile: rust/Dockerfile
target: cli
# Uncomment below to build in release mode
# args:
# RELEASE_MODE: "1"
volumes:
# The default config specifies a persist_directory of /data.
# Read more about deployments: https://docs.trychroma.com/deployment
- chroma-data:/data
environment:
- CHROMA_OPEN_TELEMETRY__ENDPOINT=${CHROMA_OPEN_TELEMETRY__ENDPOINT}
- CHROMA_OPEN_TELEMETRY__SERVICE_NAME=${CHROMA_OPEN_TELEMETRY__SERVICE_NAME}
- OTEL_EXPORTER_OTLP_HEADERS=${OTEL_EXPORTER_OTLP_HEADERS}
restart: unless-stopped # possible values are: "no", always", "on-failure", "unless-stopped"
ports:
- "8000:8000"
healthcheck:
# Adjust below to match your container port
test: [ "CMD", "curl", "-f", "http://localhost:8000/api/v2/heartbeat" ]
interval: 30s
timeout: 10s
retries: 3
networks:
- net
volumes:
chroma-data:
driver: local