Skip to content

Commit

Permalink
Improvements on Dockerfile and deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigo-brito committed Apr 19, 2019
1 parent f677d1a commit f9e3810
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 10 deletions.
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM golang:1.12 as build
WORKDIR /app
ADD . .
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-w -s" -mod vendor

FROM alpine
COPY --from=build /app/gocity /bin/gocity

RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh

CMD ["/bin/gocity", "server"]
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ build-docker:
docker build -t rodrigobrito/gocity -f ./server/docker/Dockerfile .

deploy:
cd server && we deploy -p rodrigo
heroku container:push -a go-city web
heroku container:release -a go-city web
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<hr />

Available here: https://go-city.github.io

Tool Paper: [26th International Conference on Software Analysis, Evolution and Reengineering (SANER)](https://ieeexplore.ieee.org/document/8668008)
<br>PDF Version: [ASERG Page](https://homepages.dcc.ufmg.br/~mtov/pub/2019-saner-gocity.pdf)

GoCity is an implementation of the Code City metaphor for visualizing source code. GoCity represents a Go program as a city, as follows:

Expand Down
7 changes: 4 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ func main() {
Description: "Start a local server to analyze projects",
Flags: []cli.Flag{
cli.IntFlag{
Name: "port",
Value: defaultPort,
Usage: "Local server port",
Name: "port",
Value: defaultPort,
Usage: "Local server port",
EnvVar: "PORT",
},
},
Action: func(c *cli.Context) error {
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions server/docker/Dockerfile

This file was deleted.

0 comments on commit f9e3810

Please sign in to comment.