2024-05-18 11:05:53 +00:00
|
|
|
.PHONY: deploy-prober deploy-server ui client server build
|
2024-05-03 17:11:56 +00:00
|
|
|
|
|
|
|
BINARY_NAME = xmr-nodes
|
|
|
|
|
2024-05-18 11:05:53 +00:00
|
|
|
build: client server
|
2024-05-03 17:11:56 +00:00
|
|
|
|
|
|
|
ui:
|
|
|
|
go generate ./...
|
|
|
|
|
2024-05-18 11:05:53 +00:00
|
|
|
client:
|
|
|
|
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -ldflags="-s -w" -o bin/${BINARY_NAME}-client-linux-amd64
|
|
|
|
CGO_ENABLED=0 GOARCH=arm64 GOOS=linux go build -ldflags="-s -w" -o bin/${BINARY_NAME}-client-linux-arm64
|
2024-05-03 17:11:56 +00:00
|
|
|
|
2024-05-18 11:05:53 +00:00
|
|
|
server: ui
|
|
|
|
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -ldflags="-s -w" -tags server -o bin/${BINARY_NAME}-server-linux-amd64
|
|
|
|
CGO_ENABLED=0 GOARCH=arm64 GOOS=linux go build -ldflags="-s -w" -tags server -o bin/${BINARY_NAME}-server-linux-arm64
|
2024-05-06 12:55:41 +00:00
|
|
|
|
2024-05-03 17:11:56 +00:00
|
|
|
clean:
|
|
|
|
go clean
|
|
|
|
rm -rfv ./bin
|
|
|
|
rm -rf ./frontend/build
|
2024-05-06 15:21:46 +00:00
|
|
|
|
|
|
|
# Deploying new binary file to server and probers host
|
|
|
|
# The deploy-* command doesn't build the binary file, so you need to run `make build` first.
|
|
|
|
# And make sure the inventory and deploy-*.yml file is properly configured.
|
|
|
|
|
|
|
|
deploy-server:
|
|
|
|
ansible-playbook -i ./tools/ansible/inventory.ini -l server ./tools/ansible/deploy-server.yml -K
|
|
|
|
|
|
|
|
deploy-prober:
|
|
|
|
ansible-playbook -i ./tools/ansible/inventory.ini -l prober ./tools/ansible/deploy-prober.yml -K
|