Skip to content

Commit 0f2361c

Browse files
authored
Improve cargo workspace layout (#17)
1 parent 0e678b9 commit 0f2361c

33 files changed

Lines changed: 14 additions & 17 deletions

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[workspace]
22
resolver = "3"
3-
members = ["minikv", "minikv-core"]
3+
members = ["crates/minikv", "crates/minikv-core"]
44

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

1616
[workspace.dependencies]
17-
minikv-core = { path = "minikv-core" }
17+
minikv-core = { path = "crates/minikv-core" }
1818

1919
thiserror = "2"
2020
tracing = "0.1"

docker-compose.yml renamed to compose.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ services:
1616
ports:
1717
- "8080:8080"
1818
volumes:
19-
- ./config/nginx-frontend.conf:/etc/nginx/nginx.conf:ro
19+
- ./nginx/nginx-frontend.conf:/etc/nginx/nginx.conf:ro
2020
depends_on:
2121
minikv:
2222
condition: service_started
@@ -33,7 +33,7 @@ services:
3333
minikv:
3434
build:
3535
context: .
36-
dockerfile: Dockerfile
36+
dockerfile: docker/Dockerfile
3737
target: runtime
3838
image: minikv:local
3939
container_name: minikv
@@ -78,13 +78,13 @@ services:
7878
volume1:
7979
build:
8080
context: .
81-
dockerfile: Dockerfile.volume
81+
dockerfile: docker/Dockerfile.volume
8282
image: minikv-volume:local
8383
container_name: volume1
8484
ports:
8585
- "8001:8080" # localhost:8001 → volume1:8080 (matches --public-volumes[0])
8686
volumes:
87-
- ./config/nginx-volume.conf:/etc/nginx/nginx.conf:ro
87+
- ./nginx/nginx-volume.conf:/etc/nginx/nginx.conf:ro
8888
- volume1-data:/data
8989
networks:
9090
- minikv-net
@@ -102,13 +102,13 @@ services:
102102
volume2:
103103
build:
104104
context: .
105-
dockerfile: Dockerfile.volume
105+
dockerfile: docker/Dockerfile.volume
106106
image: minikv-volume:local
107107
container_name: volume2
108108
ports:
109109
- "8002:8080" # localhost:8002 → volume2:8080 (matches --public-volumes[1])
110110
volumes:
111-
- ./config/nginx-volume.conf:/etc/nginx/nginx.conf:ro
111+
- ./nginx/nginx-volume.conf:/etc/nginx/nginx.conf:ro
112112
- volume2-data:/data
113113
networks:
114114
- minikv-net
@@ -122,13 +122,13 @@ services:
122122
volume3:
123123
build:
124124
context: .
125-
dockerfile: Dockerfile.volume
125+
dockerfile: docker/Dockerfile.volume
126126
image: minikv-volume:local
127127
container_name: volume3
128128
ports:
129129
- "8003:8080" # localhost:8003 → volume3:8080 (matches --public-volumes[2])
130130
volumes:
131-
- ./config/nginx-volume.conf:/etc/nginx/nginx.conf:ro
131+
- ./nginx/nginx-volume.conf:/etc/nginx/nginx.conf:ro
132132
- volume3-data:/data
133133
networks:
134134
- minikv-net

0 commit comments

Comments
 (0)