File tree Expand file tree Collapse file tree 6 files changed +37
-40
lines changed Expand file tree Collapse file tree 6 files changed +37
-40
lines changed Original file line number Diff line number Diff line change 10
10
11
11
# Output of the go coverage tool, specifically when used with LiteIDE
12
12
* .out
13
+ gossa
13
14
14
15
# Dependency directories (remove the comment below to include it)
15
16
# vendor/
Original file line number Diff line number Diff line change 1
- NAME =ssaplayground
2
- BUILD =$(NAME ) .out
3
- IMAGE =$(NAME )
1
+ NAME =gossa
4
2
VERSION = $(shell git describe --always --tags)
5
3
all : clean
6
- go build -o $(BUILD ) -mod vendor
7
- ./$(BUILD ) -conf configs/config.yaml
8
- docker :
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 :
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
18
- clean :
19
- rm -rf $(BUILD )
20
- .PHONY : all docker run tidy clean
4
+ go build -o $(NAME ) -mod vendor
5
+ ./$(NAME ) -conf configs/config.yaml
6
+ build :
7
+ docker build -t $(NAME ) :$(VERSION ) -t $(NAME ) :latest -f docker/Dockerfile .
8
+ up : down
9
+ docker-compose -f docker/deploy.yml up -d
10
+ down :
11
+ docker-compose -f docker/deploy.yml down
12
+ clean : down
13
+ rm -rf $(NAME )
14
+ docker rmi -f $(shell docker images -f "dangling=true" -q) 2> /dev/null; true
15
+ docker rmi -f $(NAME ) :latest $(NAME ) :$(VERSION ) 2> /dev/null; true
Original file line number Diff line number Diff line change 20
20
If you have Docker, then you can use:
21
21
22
22
``` bash
23
- $ make docker # build the docker image
24
- $ make run # run/update for latest image
23
+ $ make build # build the docker image
24
+ $ make up # run/update for latest image
25
25
```
26
26
27
27
Then access http://localhost:6789/gossa .
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
# All rights reserved. Use of this source code is governed
3
3
# by a GPLv3 license that can be found in the LICENSE file.
4
4
5
- FROM golang:1.15.3
5
+ FROM golang:1.15.6
6
6
WORKDIR /app
7
7
ADD . /app
8
8
# required for runtime/cgo
9
- RUN apt install g++
10
- RUN go get -u golang.org/x/tools/cmd/goimports && go mod tidy
11
- RUN go build -o ssaplayground.service -mod=readonly
12
- EXPOSE 6789
13
- ENTRYPOINT [ "/app/ssaplayground.service" , "-conf=/app/configs/docker.yaml" ]
9
+ RUN apt install g++ && \
10
+ go get -u golang.org/x/tools/cmd/goimports && go mod tidy && \
11
+ go build -o gossa -mod=readonly
12
+ CMD [ "/app/gossa" , "-conf=/app/configs/docker.yaml" ]
Original file line number Diff line number Diff line change
1
+ # Copyright 2020 The golang.design Initiative authors.
2
+ # All rights reserved. Use of this source code is governed
3
+ # by a GPLv3 license that can be found in the LICENSE file.
4
+
5
+ version : " 3"
6
+ services :
7
+ gossa :
8
+ container_name : gossa
9
+ restart : always
10
+ volumes :
11
+ - ../data:/app/public/buildbox
12
+ image : gossa:latest
13
+ cap_add :
14
+ - SYS_PTRACE # for debugging
15
+ ports :
16
+ - " 6789:6789"
You can’t perform that action at this time.
0 commit comments