feat: init make file and docker file
This commit is contained in:
commit
8226e179ab
|
@ -2,5 +2,5 @@
|
||||||
go.sum
|
go.sum
|
||||||
account/
|
account/
|
||||||
gen_result/
|
gen_result/
|
||||||
etc/app-cloudep-notification-service.yaml
|
etc/service.yaml
|
||||||
./client
|
./client
|
5
Makefile
5
Makefile
|
@ -1,4 +1,5 @@
|
||||||
GO_CTL_NAME=goctl
|
GO_CTL_NAME=goctl
|
||||||
|
|
||||||
# go-zero 生成風格
|
# go-zero 生成風格
|
||||||
GO_ZERO_STYLE=go_zero
|
GO_ZERO_STYLE=go_zero
|
||||||
|
|
||||||
|
@ -9,7 +10,6 @@ LDFLAGS := -s -w
|
||||||
VERSION="v1.0.3"
|
VERSION="v1.0.3"
|
||||||
DOCKER_REPO="igs170911/notification"
|
DOCKER_REPO="igs170911/notification"
|
||||||
|
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: # 進行測試
|
test: # 進行測試
|
||||||
go test -v --cover ./...
|
go test -v --cover ./...
|
||||||
|
@ -45,4 +45,5 @@ run-docker: # 建立 rpc code
|
||||||
build-docker:
|
build-docker:
|
||||||
cp ./build/Dockerfile Dockerfile
|
cp ./build/Dockerfile Dockerfile
|
||||||
docker buildx build -t $(DOCKER_REPO):$(VERSION) --build-arg SSH_PRIVATE_KEY="$(cat ~/.ssh/ed_25519)" .
|
docker buildx build -t $(DOCKER_REPO):$(VERSION) --build-arg SSH_PRIVATE_KEY="$(cat ~/.ssh/ed_25519)" .
|
||||||
rm -rf Dockerfile
|
rm -rf Dockerfile
|
||||||
|
@echo "Generate core-api files successfully"
|
||||||
|
|
|
@ -2,5 +2,5 @@ Name: service.rpc
|
||||||
ListenOn: 0.0.0.0:8080
|
ListenOn: 0.0.0.0:8080
|
||||||
Etcd:
|
Etcd:
|
||||||
Hosts:
|
Hosts:
|
||||||
- docker-etcd.digimon.orb.local:2379
|
- 127.0.0.1:2379
|
||||||
Key: service.rpc
|
Key: service.rpc
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
package senderservicelogic
|
package senderservicelogic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"app-cloudep-notification-service/gen_result/pb/notification"
|
"app-cloudep-notification-service/gen_result/pb/notification"
|
||||||
"app-cloudep-notification-service/internal/svc"
|
"app-cloudep-notification-service/internal/svc"
|
||||||
|
|
||||||
ers "code.30cm.net/digimon/library-go/errors"
|
ers "code.30cm.net/digimon/library-go/errors"
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ import (
|
||||||
|
|
||||||
"app-cloudep-notification-service/gen_result/pb/notification"
|
"app-cloudep-notification-service/gen_result/pb/notification"
|
||||||
senderservicelogic "app-cloudep-notification-service/internal/logic/senderservice"
|
senderservicelogic "app-cloudep-notification-service/internal/logic/senderservice"
|
||||||
|
"app-cloudep-notification-service/internal/logic/senderservice"
|
||||||
"app-cloudep-notification-service/internal/svc"
|
"app-cloudep-notification-service/internal/svc"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue