mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-10 02:10:17 +08:00
Moved volumes folder to internal folder. Moved main.go file to the project's root instead of the cmd directory.
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,9 +1,8 @@
|
||||
.idea
|
||||
.DS_Store
|
||||
bin
|
||||
volumes/nodes
|
||||
internal/volumes/nodes
|
||||
dist/
|
||||
pkg/modules/*/aof
|
||||
pkg/echovault/aof
|
||||
dump.rdb
|
||||
**/*/testdata
|
||||
echovault/aof
|
||||
|
@@ -8,11 +8,11 @@ COPY . ./
|
||||
ENV CGO_ENABLED=1 CC=gcc GOOS=linux GOARCH=amd64
|
||||
|
||||
ENV DEST=volumes/modules
|
||||
RUN CGO_ENABLED=$CGO_ENABLED CC=$CC GOOS=$GOOS GOARCH=$GOARCH go build -buildmode=plugin -o $DEST/module_set/module_set.so ./volumes/modules/module_set/module_set.go
|
||||
RUN CGO_ENABLED=$CGO_ENABLED CC=$CC GOOS=$GOOS GOARCH=$GOARCH go build -buildmode=plugin -o $DEST/module_get/module_get.so ./volumes/modules/module_get/module_get.go
|
||||
RUN CGO_ENABLED=$CGO_ENABLED CC=$CC GOOS=$GOOS GOARCH=$GOARCH go build -buildmode=plugin -o $DEST/module_set/module_set.so ./internal/volumes/modules/module_set/module_set.go
|
||||
RUN CGO_ENABLED=$CGO_ENABLED CC=$CC GOOS=$GOOS GOARCH=$GOARCH go build -buildmode=plugin -o $DEST/module_get/module_get.so ./internal/volumes/modules/module_get/module_get.go
|
||||
|
||||
ENV DEST=bin/linux/x86_64
|
||||
RUN CGO_ENABLED=$CGO_ENABLED CC=$CC GOOS=$GOOS GOARCH=$GOARCH go build -o $DEST/server ./cmd/main.go
|
||||
RUN CGO_ENABLED=$CGO_ENABLED CC=$CC GOOS=$GOOS GOARCH=$GOARCH go build -o $DEST/server .
|
||||
|
||||
|
||||
|
||||
|
10
Makefile
10
Makefile
@@ -2,14 +2,14 @@ run:
|
||||
docker-compose up --build
|
||||
|
||||
build-local:
|
||||
CGO_ENABLED=1 go build -buildmode=plugin -o ./bin/modules/module_set/module_set.so ./volumes/modules/module_set/module_set.go && \
|
||||
CGO_ENABLED=1 go build -buildmode=plugin -o ./bin/modules/module_get/module_get.so ./volumes/modules/module_get/module_get.go && \
|
||||
CGO_ENABLED=1 go build -o ./bin ./cmd/...
|
||||
CGO_ENABLED=1 go build -buildmode=plugin -o ./bin/modules/module_set/module_set.so ./internal/volumes/modules/module_set/module_set.go && \
|
||||
CGO_ENABLED=1 go build -buildmode=plugin -o ./bin/modules/module_get/module_get.so ./internal/volumes/modules/module_get/module_get.go && \
|
||||
CGO_ENABLED=1 go build -o ./bin ./...
|
||||
|
||||
|
||||
build-modules-test:
|
||||
CGO_ENABLED=1 go build --race=$(RACE) -buildmode=plugin -o $(OUT)/modules/module_set/module_set.so ./volumes/modules/module_set/module_set.go && \
|
||||
CGO_ENABLED=1 go build --race=$(RACE) -buildmode=plugin -o $(OUT)/modules/module_get/module_get.so ./volumes/modules/module_get/module_get.go
|
||||
CGO_ENABLED=1 go build --race=$(RACE) -buildmode=plugin -o $(OUT)/modules/module_set/module_set.so ./internal/volumes/modules/module_set/module_set.go && \
|
||||
CGO_ENABLED=1 go build --race=$(RACE) -buildmode=plugin -o $(OUT)/modules/module_get/module_get.so ./internal/volumes/modules/module_get/module_get.go
|
||||
|
||||
test:
|
||||
env RACE=false OUT=internal/modules/admin/testdata make build-modules-test && \
|
||||
|
@@ -45,8 +45,8 @@ services:
|
||||
- "7480:7480"
|
||||
- "7946:7946"
|
||||
volumes:
|
||||
- ./volumes/config:/etc/echovault/config
|
||||
- ./volumes/nodes/standalone_node:/var/lib/echovault
|
||||
- ./internal/volumes/config:/etc/echovault/config
|
||||
- ./internal/volumes/nodes/standalone_node:/var/lib/echovault
|
||||
networks:
|
||||
- testnet
|
||||
|
||||
@@ -89,8 +89,8 @@ services:
|
||||
- "7481:7480"
|
||||
- "7945:7946"
|
||||
volumes:
|
||||
- ./volumes/config:/etc/echovault/config
|
||||
- ./volumes/nodes/cluster_node_1:/var/lib/echovault
|
||||
- ./internal/volumes/config:/etc/echovault/config
|
||||
- ./internal/volumes/nodes/cluster_node_1:/var/lib/echovault
|
||||
networks:
|
||||
- testnet
|
||||
|
||||
@@ -133,8 +133,8 @@ services:
|
||||
- "7482:7480"
|
||||
- "7947:7946"
|
||||
volumes:
|
||||
- ./volumes/config:/etc/echovault/config
|
||||
- ./volumes/nodes/cluster_node_2:/var/lib/echovault
|
||||
- ./internal/volumes/config:/etc/echovault/config
|
||||
- ./internal/volumes/nodes/cluster_node_2:/var/lib/echovault
|
||||
networks:
|
||||
- testnet
|
||||
|
||||
@@ -177,8 +177,8 @@ services:
|
||||
- "7483:7480"
|
||||
- "7948:7946"
|
||||
volumes:
|
||||
- ./volumes/config:/etc/echovault/config
|
||||
- ./volumes/nodes/cluster_node_3:/var/lib/echovault
|
||||
- ./internal/volumes/config:/etc/echovault/config
|
||||
- ./internal/volumes/nodes/cluster_node_3:/var/lib/echovault
|
||||
networks:
|
||||
- testnet
|
||||
|
||||
@@ -221,8 +221,8 @@ services:
|
||||
- "7484:7480"
|
||||
- "7949:7946"
|
||||
volumes:
|
||||
- ./volumes/config:/etc/echovault/config
|
||||
- ./volumes/nodes/cluster_node_4:/var/lib/echovault
|
||||
- ./internal/volumes/config:/etc/echovault/config
|
||||
- ./internal/volumes/nodes/cluster_node_4:/var/lib/echovault
|
||||
networks:
|
||||
- testnet
|
||||
|
||||
@@ -265,7 +265,7 @@ services:
|
||||
- "7485:7480"
|
||||
- "7950:7946"
|
||||
volumes:
|
||||
- ./volumes/config:/etc/echovault/config
|
||||
- ./volumes/nodes/cluster_node_5:/var/lib/echovault
|
||||
- ./internal/volumes/config:/etc/echovault/config
|
||||
- ./internal/volumes/nodes/cluster_node_5:/var/lib/echovault
|
||||
networks:
|
||||
- testnet
|
Reference in New Issue
Block a user