run:
	go run -race main.go

run_docker: build
	docker run -p 8080:8080 -e PORT=8080 -e RBAC_HOST=http://localhost:9000 vienna

help:
	go run main.go -h

lint:
	# Using default linters (golangci-lint help linters) (brew install golangci/tap/golangci-lint)
	golangci-lint run

test:
	# Unit tests
	go test ./...

build:
	# Build Docker Image (make sure you are in the Twitch-VPN if the build needs to install node_modules)
	docker build -t vienna .

run_ci_docker: build_ci
	docker run vienna_go_build make lint test

build_ci:
	# Build Docker Images to run tests on the CI server (Jenkins)
	docker build --target go_build -t vienna_go_build .

inspect_docker: build
	# Interactive sh shell inside the vienna container
	docker run -it --entrypoint /bin/bash

deploy_prod: lint test build
	# Build and push Docker image to ECR, vienna-prod
	./scripts/deploy.sh prod

deploy_dev: lint test build
	# Build and push Docker image to ECR, vienna-dev
	./scripts/deploy.sh dev
