<commit_before>NAME ?= sketchband
PORT ?= 1967

dev-serve:; ./node_modules/.bin/webpack-dev-server
build:; node_modules/.bin/webpack
serve:; node_modules/.bin/http-server -c-1 ./dist
serve-https:; node_modules/.bin/http-server -c-1 -S \
  -C $(SSL_CERT) -K $(SSL_KEY) ./dist

build-docker:; docker build -t $(NAME) .
stop-docker:; docker stop $(NAME) && docker rm $(NAME)

# Assumes a LetsEncrypt-style setup...
start-docker-https: build-docker
	docker run -d \
	  -p 443:443 \
	  -v $(SSL_PATH):/ssl \
          --name $(NAME) $(NAME) \
	  ./dumb-init /node_modules/.bin/http-server -p 443 -c-1 -S \
	    -C/ssl/live/$(HOSTNAME)/fullchain.pem \
	    -K/ssl/live/$(HOSTNAME)/privkey.pem \
	    ./dist

restart-docker-https: build-docker stop-docker start-docker-https

live-deploy-docker-https: start-docker-https
	./live-deploy-docker-https

# Serves $(FILES) over HTTPS on port 1967...
start-file-server:
	docker run -d \
	  -p 1967:443 \
	  -v $(SSL_PATH):/ssl \
          -v $(FILES):/files \
	  --name $(NAME)-files $(NAME) \
	  ./dumb-init /node_modules/.bin/http-server -p 443 -c 9999 -S \
	    -C/ssl/live/$(HOSTNAME)/fullchain.pem \
	    -K/ssl/live/$(HOSTNAME)/privkey.pem \
	    --cors \
	    /files<commit_msg>ugh, correct path to dumb-init<commit_after>NAME ?= sketchband
PORT ?= 1967

dev-serve:; ./node_modules/.bin/webpack-dev-server
build:; node_modules/.bin/webpack
serve:; node_modules/.bin/http-server -c-1 ./dist
serve-https:; node_modules/.bin/http-server -c-1 -S \
  -C $(SSL_CERT) -K $(SSL_KEY) ./dist

build-docker:; docker build -t $(NAME) .
stop-docker:; docker stop $(NAME) && docker rm $(NAME)

# Assumes a LetsEncrypt-style setup...
start-docker-https: build-docker
	docker run -d \
	  -p 443:443 \
	  -v $(SSL_PATH):/ssl \
          --name $(NAME) $(NAME) \
	  /dumb-init /node_modules/.bin/http-server -p 443 -c-1 -S \
	    -C/ssl/live/$(HOSTNAME)/fullchain.pem \
	    -K/ssl/live/$(HOSTNAME)/privkey.pem \
	    ./dist

restart-docker-https: build-docker stop-docker start-docker-https

live-deploy-docker-https: start-docker-https
	./live-deploy-docker-https

# Serves $(FILES) over HTTPS on port 1967...
start-file-server:
	docker run -d \
	  -p 1967:443 \
	  -v $(SSL_PATH):/ssl \
          -v $(FILES):/files \
	  --name $(NAME)-files $(NAME) \
	  /dumb-init /node_modules/.bin/http-server -p 443 -c 9999 -S \
	    -C/ssl/live/$(HOSTNAME)/fullchain.pem \
	    -K/ssl/live/$(HOSTNAME)/privkey.pem \
	    --cors \
	    /files
{'fraction_non_alphanumeric': 0.18706791378609192, 'fraction_numerical': 0.027653517690117934, 'mean_word_length': 2.4745762711864407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2379195', 'n_tokens_mistral': 1056, 'n_tokens_neox': 931, 'n_words': 195}