-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
34 lines (28 loc) · 1.05 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.PHONY: help
help:
@echo " setup"
@echo " Build the development containers and install dependencies."
@echo " update"
@echo " Install / update dependencies in the development containers."
@echo " build"
@echo " Build the production assets."
setup: dev-build update
dev-build: Dockerfile.python
@docker-compose build
.PHONY: up
up:
@docker-compose up
update: website/requirements.txt
@echo "Installing / updating dependencies ..."
@docker-compose run --rm website pip install --user -r requirements.txt
@echo "Successfully built containers and installed dependencies."
SITEURL ?= http://localhost:8000
.PHONY: build
build:
@docker build --build-arg siteurl=${SITEURL} --build-arg offenaccountid=${OFFEN_ACCOUNT_ID} -t analyticstxt/website -f build/Dockerfile .
@rm -rf output && mkdir output
@docker create --entrypoint=bash --name assets analyticstxt/website
@docker cp assets:/code/website/output/. ./output/
@mkdir -p ./output/.well-known
@cp build/analytics.txt ./output/.well-known/analytics.txt
@docker rm assets