<commit_before>.PHONY: build build-site build-run-letsencrypt push push-site push-run-letsencrypt \
  run-letsencrypt serve deploy-site

build: build-site build-run-letsencrypt

build-site:
	docker build -t site .

build-run-letsencrypt:
	docker build -t run-letsencrypt . -f Dockerfile.run-letsencrypt

push: push-site push-run-letsencrypt

push-site: IMAGE = gcr.io/broad-ctsa/site:$(shell docker images -q --no-trunc site | sed -e 's,[^:]*:,,')
push-site: build-site
	echo $(IMAGE) > site-image
	docker tag site $(IMAGE)
	docker push $(IMAGE)

push-run-letsencrypt: build-run-letsencrypt
	docker tag run-letsencrypt gcr.io/broad-ctsa/run-letsencrypt
	docker push gcr.io/broad-ctsa/run-letsencrypt

run-letsencrypt:
	run-letsencrypt.sh

serve:
	docker run -it -p 80:80 -p 443:443 -v $$(pwd)/letsencrypt:/etc/letsencrypt site

deploy-site:
	kubectl apply -f service.yaml
	sed -e "s,@sha@,$(shell git rev-parse --short=12 HEAD)," \
	  -e "s,@image@,$(shell cat site-image)," \
	  < site-deployment.yaml.in > site-deployment.yaml
	kubectl apply -f site-deployment.yaml<commit_msg>site: delete/create instead of apply (#4476)<commit_after>.PHONY: build build-site build-run-letsencrypt push push-site push-run-letsencrypt \
  run-letsencrypt serve deploy-site

build: build-site build-run-letsencrypt

build-site:
	docker build -t site .

build-run-letsencrypt:
	docker build -t run-letsencrypt . -f Dockerfile.run-letsencrypt

push: push-site push-run-letsencrypt

push-site: IMAGE = gcr.io/broad-ctsa/site:$(shell docker images -q --no-trunc site | sed -e 's,[^:]*:,,')
push-site: build-site
	echo $(IMAGE) > site-image
	docker tag site $(IMAGE)
	docker push $(IMAGE)

push-run-letsencrypt: build-run-letsencrypt
	docker tag run-letsencrypt gcr.io/broad-ctsa/run-letsencrypt
	docker push gcr.io/broad-ctsa/run-letsencrypt

run-letsencrypt:
	run-letsencrypt.sh

serve:
	docker run -it -p 80:80 -p 443:443 -v $$(pwd)/letsencrypt:/etc/letsencrypt site

deploy-site:
	kubectl apply -f service.yaml
	sed -e "s,@sha@,$(shell git rev-parse --short=12 HEAD)," \
	  -e "s,@image@,$(shell cat site-image)," \
	  < site-deployment.yaml.in > site-deployment.yaml
	kubectl delete -f site-deployment.yaml
	sleep 5
	kubectl create -f site-deployment.yaml
{'fraction_non_alphanumeric': 0.14202769093345244, 'fraction_numerical': 0.012952210808396605, 'mean_word_length': 3.9557522123893807, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6907792', 'n_tokens_mistral': 903, 'n_tokens_neox': 843, 'n_words': 200}