mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-23 10:07:30 +00:00
Introduce Makefile and go vendor directory for faster build (#67)
This commit is contained in:
parent
b4970f37c4
commit
42e281234c
1709 changed files with 521045 additions and 14 deletions
21
Makefile
vendored
Normal file
21
Makefile
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
dep:
|
||||
go mod download
|
||||
go mod vendor
|
||||
go mod tidy
|
||||
|
||||
build: dep
|
||||
go build -o build/klog ./cmd
|
||||
|
||||
run: build
|
||||
# Run coordinator first
|
||||
./build/klog -overlordhost overlord &
|
||||
# Wait till overlord finish initialized
|
||||
# Run a worker connecting to overload
|
||||
./build/klog -overlordhost ws://localhost:8000/wso
|
||||
|
||||
run-docker:
|
||||
docker build . -t cloud-game-local
|
||||
docker stop cloud-game-local
|
||||
docker rm cloud-game-local
|
||||
# Overlord and worker should be run separately. Local is for demo purpose
|
||||
docker run --privileged -v $PWD/games:/cloud-game/games -d --name cloud-game-local -p 8000:8000 -p 9000:9000 cloud-game-local bash -c "cmd -overlordhost ws://localhost:8000/wso & cmd -overlordhost overlord"
|
||||
Loading…
Add table
Add a link
Reference in a new issue