Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Makefile, compose and swagger dependencies #77

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
.idea/
.env
api
tls/*.pem
cmd/dataloader
cp.out
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ db:
all: build

certs: ## Generate TLS cert files
cd tls && go run /usr/local/go/src/crypto/tls/generate_cert.go --rsa-bits=2048 --host=localhost
cd tls && go run /usr/local/go/src/crypto/tls/generate_cert.go --rsa-bits=2048 --host=localhost && cd ../

lint: ## Lint the files
@golint -set_exit_status ${PKG_LIST}
Expand All @@ -34,8 +34,8 @@ coverhtml: ## Generate global code coverage report in HTML
dep: ## Get the dependencies
@go get -v -d -t ./...

build: dep ## Build the binary file
@go build -i -v $(PKG)
build_api: dep ## Build the binary file
@go build -i -v -o api ./cmd/api/.

clean: ## Remove previous build
@rm -f $(PROJECT_NAME)
Expand Down
1 change: 1 addition & 0 deletions cmd/api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ func main() {
db, err := openDB(dsn)

if err != nil {
infoLog.Output(1, fmt.Sprintf("DSN: %s", dsn))
errorLog.Fatal(err)
}
db.SetMaxIdleConns(50)
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ services:
container_name: morellis-mysql
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: morellis
MYSQL_USER: morellis
MYSQL_PASSWORD: E4j+#2G^8Pa=^Nn9
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS:-password}
MYSQL_DATABASE: ${DB_DATABASE:-}morellis
MYSQL_USER: ${DB_USER:-morellis}
MYSQL_PASSWORD: ${DB_PASS}
volumes:
- ./sql:/docker-entrypoint-initdb.d
- ./data:/var/lib/mysql
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ require (
google.golang.org/appengine v1.4.0 // indirect
googlemaps.github.io/maps v0.0.0-20190206003505-be134e760d70
)

go 1.13
Loading