mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
There's no official image for hugo, so lets make our own and have the Makefile build the Dockerfile Add some basic documentation I've added some simple documentation and tidied up the Dockerfile. I move the file to use best practice and reduced the size slightly. Personally I don't think we'll need to alter the address and not watch files as it's only going to be used for local development atm. It might be useful in future to move to being able to alter these if we're using this in production Don't use docs use hugo It would be confusing for people to docker pull the docs but not have any docs included in them. hugo as the name would make way more sense. Don't lock down to digest We should trust official libs, especially the alpine build. Signed-off-by: Chris M <millscj01@gmail.com>
70 lines
1.1 KiB
Makefile
70 lines
1.1 KiB
Makefile
.PHONY: build
|
|
build:
|
|
cd cmd/proxy && buffalo build
|
|
|
|
.PHONY: run
|
|
run: build
|
|
./athens
|
|
|
|
.PHONY: docs
|
|
docs:
|
|
docker build -t gomods/hugo -f docs/Dockerfile .
|
|
|
|
.PHONY: setup-dev-env
|
|
setup-dev-env:
|
|
./scripts/get_dev_tools.sh
|
|
$(MAKE) dev
|
|
|
|
.PHONY: verify
|
|
verify:
|
|
./scripts/check_gofmt.sh
|
|
./scripts/check_golint.sh
|
|
./scripts/check_deps.sh
|
|
./scripts/check_conflicts.sh
|
|
|
|
.PHONY: test
|
|
test:
|
|
cd cmd/proxy && buffalo test
|
|
|
|
.PHONY: test-unit
|
|
test-unit:
|
|
./scripts/test_unit.sh
|
|
|
|
.PHONY: test-e2e
|
|
test-e2e:
|
|
./scripts/test_e2e.sh
|
|
|
|
.PHONY: docker
|
|
docker: proxy-docker
|
|
|
|
.PHONY: proxy-docker
|
|
proxy-docker:
|
|
docker build -t gomods/proxy -f cmd/proxy/Dockerfile .
|
|
|
|
.PHONY: docker-push
|
|
docker-push: docker
|
|
./scripts/push-docker-images.sh
|
|
|
|
bench:
|
|
./scripts/benchmark.sh
|
|
|
|
.PHONY: alldeps
|
|
alldeps:
|
|
docker-compose -p athensdev up -d mongo
|
|
docker-compose -p athensdev up -d minio
|
|
docker-compose -p athensdev up -d jaeger
|
|
echo "sleeping for a bit to wait for the DB to come up"
|
|
sleep 5
|
|
|
|
.PHONY: dev
|
|
dev:
|
|
docker-compose -p athensdev up -d mongo
|
|
|
|
.PHONY: down
|
|
down:
|
|
docker-compose -p athensdev down -v
|
|
|
|
.PHONY: dev-teardown
|
|
dev-teardown:
|
|
docker-compose -p athensdev down -v
|