-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
52 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
BUILD=ssaplayground.out | ||
all: | ||
NAME=ssaplayground | ||
BUILD=$(NAME).out | ||
IMAGE=$(NAME) | ||
VERSION = $(shell git describe --always --tags) | ||
all: clean | ||
go build -o $(BUILD) -mod vendor | ||
start: | ||
./$(BUILD) -conf config/config.yaml | ||
./$(BUILD) -conf configs/config.yaml | ||
docker: | ||
docker build -t ssaplayground:v0.1 -f docker/Dockerfile . | ||
update: | ||
docker run -itd -v ~/dev/ssaplayground/data:/app/public/buildbox -p 6789:6789 ssaplayground:v0.1 | ||
docker build -t $(IMAGE):$(VERSION) -t $(IMAGE):latest -f docker/Dockerfile . | ||
run: | ||
docker ps -a | grep $(NAME) && ([ $$? -eq 0 ] && (docker stop $(NAME) && docker rm -f $(NAME))) || echo "no running container." | ||
docker run -itd -v $(shell pwd)/data:/app/public/buildbox -p 6789:6789 --name $(NAME) ssaplayground:latest | ||
tidy-docker: | ||
docker ps -a | grep $(NAME) | ||
[ $$? -eq 0 ] && docker stop $(NAME) && docker rm -f $(NAME) | ||
docker images -f "dangling=true" -q | xargs docker rmi -f | ||
docker image prune -f | ||
clean: | ||
rm -rf $(BUILD) | ||
.PHONY: all start docker update clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
addr: localhost:6789 | ||
mode: debug | ||
static: public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
--- | ||
addr: 0.0.0.0:6789 | ||
mode: debug | ||
mode: release | ||
static: public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
FROM alpine:latest | ||
|
||
FROM golang:1.14-alpine | ||
WORKDIR /app | ||
ADD . /app | ||
RUN go get -u golang.org/x/tools/cmd/goimports && go mod tidy | ||
RUN go build -o ssaplayground.service -mod vendor | ||
EXPOSE 6789 | ||
ENTRYPOINT [ "/app/ssaplayground.service", "-conf=/app/configs/docker.yaml"] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!-- this is intended for empty --> |