Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
resolver = "3"
members = ["minikv", "minikv-core"]
members = ["crates/minikv", "crates/minikv-core"]

[workspace.package]
version = "0.1.0"
Expand All @@ -14,7 +14,7 @@ keywords = ["storage", "distributed", "leveldb", "object-store"]
categories = ["database", "network-programming"]

[workspace.dependencies]
minikv-core = { path = "minikv-core" }
minikv-core = { path = "crates/minikv-core" }

thiserror = "2"
tracing = "0.1"
Expand Down
16 changes: 8 additions & 8 deletions docker-compose.yml β†’ compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
ports:
- "8080:8080"
volumes:
- ./config/nginx-frontend.conf:/etc/nginx/nginx.conf:ro
- ./nginx/nginx-frontend.conf:/etc/nginx/nginx.conf:ro
depends_on:
minikv:
condition: service_started
Expand All @@ -33,7 +33,7 @@ services:
minikv:
build:
context: .
dockerfile: Dockerfile
dockerfile: docker/Dockerfile
target: runtime
image: minikv:local
container_name: minikv
Expand Down Expand Up @@ -78,13 +78,13 @@ services:
volume1:
build:
context: .
dockerfile: Dockerfile.volume
dockerfile: docker/Dockerfile.volume
image: minikv-volume:local
container_name: volume1
ports:
- "8001:8080" # localhost:8001 β†’ volume1:8080 (matches --public-volumes[0])
volumes:
- ./config/nginx-volume.conf:/etc/nginx/nginx.conf:ro
- ./nginx/nginx-volume.conf:/etc/nginx/nginx.conf:ro
- volume1-data:/data
networks:
- minikv-net
Expand All @@ -102,13 +102,13 @@ services:
volume2:
build:
context: .
dockerfile: Dockerfile.volume
dockerfile: docker/Dockerfile.volume
image: minikv-volume:local
container_name: volume2
ports:
- "8002:8080" # localhost:8002 β†’ volume2:8080 (matches --public-volumes[1])
volumes:
- ./config/nginx-volume.conf:/etc/nginx/nginx.conf:ro
- ./nginx/nginx-volume.conf:/etc/nginx/nginx.conf:ro
- volume2-data:/data
networks:
- minikv-net
Expand All @@ -122,13 +122,13 @@ services:
volume3:
build:
context: .
dockerfile: Dockerfile.volume
dockerfile: docker/Dockerfile.volume
image: minikv-volume:local
container_name: volume3
ports:
- "8003:8080" # localhost:8003 β†’ volume3:8080 (matches --public-volumes[2])
volumes:
- ./config/nginx-volume.conf:/etc/nginx/nginx.conf:ro
- ./nginx/nginx-volume.conf:/etc/nginx/nginx.conf:ro
- volume3-data:/data
networks:
- minikv-net
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 4 additions & 7 deletions Dockerfile β†’ docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ WORKDIR /build
# -----------------------------------------------------------------------------
FROM chef AS planner

# Copy workspace manifests, preserving folder structure
COPY Cargo.toml Cargo.lock ./
COPY minikv ./minikv
COPY minikv-core ./minikv-core
COPY crates ./crates

RUN cargo chef prepare --recipe-path recipe.json

Expand All @@ -48,10 +48,7 @@ COPY --from=planner /build/recipe.json recipe.json

RUN cargo chef cook --release --recipe-path recipe.json

COPY Cargo.toml Cargo.lock ./
COPY minikv ./minikv
COPY minikv-core ./minikv-core
COPY config ./config
COPY . .

# Enforce strict compilation rules.
ENV RUSTFLAGS="-D warnings -D unsafe_code"
Expand All @@ -75,7 +72,7 @@ LABEL org.opencontainers.image.licenses="MIT"
COPY --from=builder /build/target/release/minikv /usr/local/bin/minikv

# Copy nginx reference configuration (for operators).
COPY --from=builder /build/config/nginx-volume.conf /etc/minikv/nginx-volume.conf
COPY --from=builder /build/nginx/nginx-volume.conf /etc/minikv/nginx-volume.conf

# Working directory for the metadata database.
# This path must be mounted as a volume in production.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.