File tree Expand file tree Collapse file tree 8 files changed +52
-10
lines changed
Expand file tree Collapse file tree 8 files changed +52
-10
lines changed Original file line number Diff line number Diff line change 1- BUILD =ssaplayground.out
2- all :
1+ NAME =ssaplayground
2+ BUILD =$(NAME ) .out
3+ IMAGE =$(NAME )
4+ VERSION = $(shell git describe --always --tags)
5+ all : clean
36 go build -o $(BUILD ) -mod vendor
4- start :
5- ./$(BUILD ) -conf config/config.yaml
7+ ./$(BUILD ) -conf configs/config.yaml
68docker :
7- docker build -t ssaplayground:v0.1 -f docker/Dockerfile .
8- update :
9- docker run -itd -v ~ /dev/ssaplayground/data:/app/public/buildbox -p 6789:6789 ssaplayground:v0.1
9+ docker build -t $(IMAGE ) :$(VERSION ) -t $(IMAGE ) :latest -f docker/Dockerfile .
10+ run :
11+ docker ps -a | grep $(NAME ) && ([ $$ ? -eq 0 ] && (docker stop $( NAME) && docker rm -f $( NAME) )) || echo " no running container."
12+ docker run -itd -v $(shell pwd) /data:/app/public/buildbox -p 6789:6789 --name $(NAME ) ssaplayground:latest
13+ tidy-docker :
14+ docker ps -a | grep $(NAME )
15+ [ $$ ? -eq 0 ] && docker stop $(NAME ) && docker rm -f $(NAME )
16+ docker images -f " dangling=true" -q | xargs docker rmi -f
17+ docker image prune -f
1018clean :
1119 rm -rf $(BUILD )
1220.PHONY : all start docker update clean
Original file line number Diff line number Diff line change @@ -6,6 +6,30 @@ A tool for exploring go ssa intermediate representation.
66
77![ ] ( ./public/assets/screen.png )
88
9+ ## Deployment
10+
11+ There are two approaches to use the SSA Playground: native execution
12+ or Docker-based deployment.
13+
14+ To execute natively, you can just use:
15+
16+ ``` bash
17+ $ make
18+ ```
19+
20+ If you have Docker, then you can use:
21+
22+ ``` bash
23+ $ make docker # build the docker image
24+ $ make run # run/update for latest image
25+ ```
26+
27+ Then access http://localhost:6789/gossa .
28+
29+ ## Contribution
30+
31+ We would love to hear your feedback. Submit [ an issue] ( https://github.com/changkun/ssaplayground/issues/new ) to tell bugs or feature requests.
32+
933## License
1034
1135GNU GPLv3 © ; [ Changkun Ou] ( https://changkun.de )
Original file line number Diff line number Diff line change 1+ ---
2+ addr : localhost:6789
3+ mode : debug
4+ static : public
Original file line number Diff line number Diff line change 11---
22addr : 0.0.0.0:6789
3- mode : debug
3+ mode : release
44static : public
Original file line number Diff line number Diff line change 1- FROM alpine:latest
2-
1+ FROM golang:1.14-alpine
2+ WORKDIR /app
3+ ADD . /app
4+ RUN go get -u golang.org/x/tools/cmd/goimports && go mod tidy
5+ RUN go build -o ssaplayground.service -mod vendor
6+ EXPOSE 6789
7+ ENTRYPOINT [ "/app/ssaplayground.service" , "-conf=/app/configs/docker.yaml" ]
Original file line number Diff line number Diff line change 1+ <!-- this is intended for empty -->
You can’t perform that action at this time.
0 commit comments