Skip to content

Commit

Permalink
build(makefile): add commands to build the project
Browse files Browse the repository at this point in the history
  • Loading branch information
danvergara committed May 1, 2021
1 parent 6bf535d commit bf478d0
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
PLATFORM=linux/amd64

.PHONY: test
## test: Runs the tests
test:
Expand All @@ -18,6 +20,31 @@ linter:
test-all:
@./scripts/test_all.sh

.PHONY: docker-build
## docker-build: Builds de Docker image
docker-build:
@docker build --target bin --output bin/ --platform ${PLATFORM} -t dblab .

.PHONY: build
## build: Builds the Go program
build:
go build -o dblab .

.PHONY: run
## run: Runs the application
run: build
./dblab --host localhost --user postgres --db users --pass password --ssl disable --port 5432 --driver postgres

.PHONY: up
## up: Runs all the containers listed in the docker-compose.yml file
up:
docker-compose up --build -d

.PHONY: down
## down: Shut down all the containers listed in the docker-compose.yml file
down:
docker-compose down

.PHONY: help
## help: Prints this help message
help:
Expand Down

0 comments on commit bf478d0

Please sign in to comment.