fix naming in prod
This commit is contained in:
+9
-9
@@ -5,8 +5,8 @@ vars:
|
||||
PKG: main
|
||||
BINARY_DIR: ./bin
|
||||
DEV_BINARY_DIR: ./local
|
||||
BINARY_API: "{{.BINARY_DIR}}/go-api"
|
||||
DEV_BINARY_API: "{{.DEV_BINARY_DIR}}/go-api/"
|
||||
BINARY_API: "{{.BINARY_DIR}}/abuse-registration-api"
|
||||
DEV_BINARY_API: "{{.DEV_BINARY_DIR}}/abuse-registration-api/"
|
||||
|
||||
tasks:
|
||||
|
||||
@@ -27,10 +27,10 @@ tasks:
|
||||
desc: build api, stage files, and deploy api to remote server
|
||||
deps: [build]
|
||||
cmds:
|
||||
- ssh {{.SERVER}} "rm -rf /tmp/go-api-deploy && mkdir -p /tmp/go-api-deploy"
|
||||
- rsync -avz --delete {{.BINARY_API}} {{.SERVER}}:/tmp/go-api-deploy/
|
||||
- ssh -t {{.SERVER}} "sudo rsync -a --delete --exclude='.env' --exclude='config.json' --exclude='data/' --chown=go-api:go-api /tmp/go-api-deploy/ /opt/go-api/ && sudo systemctl restart go-api"
|
||||
- ssh {{.SERVER}} "rm -rf /tmp/go-api-deploy"
|
||||
- ssh {{.SERVER}} "rm -rf /tmp/abuse-registration-api-deploy && mkdir -p /tmp/abuse-registration-api-deploy"
|
||||
- rsync -avz --delete {{.BINARY_API}} {{.SERVER}}:/tmp/abuse-registration-api-deploy/
|
||||
- ssh -t {{.SERVER}} "sudo rsync -a --delete --exclude='.env' --exclude='config.json' --exclude='data/' --chown=abuse-registration-api:abuse-registration-api /tmp/abuse-registration-api-deploy/ /opt/abuse-registration-api/ && sudo systemctl restart abuse-registration-api"
|
||||
- ssh {{.SERVER}} "rm -rf /tmp/abuse-registration-api-deploy"
|
||||
|
||||
dev-build:
|
||||
desc: runs DEV for vet, fmt, and build DEV api
|
||||
@@ -41,7 +41,7 @@ tasks:
|
||||
cmds:
|
||||
- go tool task dev-clean-api
|
||||
- mkdir -p {{.DEV_BINARY_API}}
|
||||
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o {{.DEV_BINARY_API}}/go-api ./cmd/api
|
||||
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o {{.DEV_BINARY_API}}/abuse-registration-api ./cmd/api
|
||||
|
||||
dev-start-api:
|
||||
desc: build api, create dirs, and start DEV api binary
|
||||
@@ -49,7 +49,7 @@ tasks:
|
||||
cmds:
|
||||
- "rm -rf *"
|
||||
- go tool task dev-build-api
|
||||
- "./go-api"
|
||||
- "./abuse-registration-api"
|
||||
|
||||
run:
|
||||
desc: run the POC API locally on :8080 by default
|
||||
@@ -77,4 +77,4 @@ tasks:
|
||||
|
||||
dev-clean-api:
|
||||
cmds:
|
||||
- rm -f {{.DEV_BINARY_API}}/go-api
|
||||
- rm -f {{.DEV_BINARY_API}}/abuse-registration-api
|
||||
|
||||
Reference in New Issue
Block a user