mirror of
https://github.com/offen/website.git
synced 2024-11-24 18:00:27 +01:00
update makefile
This commit is contained in:
parent
3a4cbaed12
commit
98a280717a
32
Makefile
32
Makefile
@ -1,28 +1,40 @@
|
|||||||
|
.PHONY: help
|
||||||
|
help: # @HELP Print this message
|
||||||
help:
|
help:
|
||||||
@echo " setup"
|
@echo "TARGETS:"
|
||||||
@echo " Build the development containers and install dependencies."
|
@grep -E '^.*: *# *@HELP' $(MAKEFILE_LIST) \
|
||||||
@echo " update"
|
| awk ' \
|
||||||
@echo " Install / update dependencies in the development containers."
|
BEGIN {FS = ": *# *@HELP"}; \
|
||||||
@echo " build"
|
{ printf " %-20s %s\n", $$1, $$2 }; \
|
||||||
@echo " Build the production assets."
|
'
|
||||||
|
|
||||||
|
.PHONY: setup
|
||||||
|
setup: # @HELP Build the development containers and install dependencies
|
||||||
setup: dev-build update
|
setup: dev-build update
|
||||||
|
|
||||||
|
.PHONY: dev-build
|
||||||
|
dev-build: # @HELP Build the development containers
|
||||||
dev-build:
|
dev-build:
|
||||||
@docker-compose build
|
@docker-compose build
|
||||||
|
|
||||||
up:
|
.PHONY: update
|
||||||
@docker-compose up
|
update: # @HELP Install Python dependencies
|
||||||
|
|
||||||
update:
|
update:
|
||||||
@echo "Installing / updating dependencies ..."
|
@echo "Installing / updating dependencies ..."
|
||||||
@docker-compose run homepage pip install --user -r requirements.txt
|
@docker-compose run homepage pip install --user -r requirements.txt
|
||||||
@echo "Successfully built containers and installed dependencies."
|
@echo "Successfully built containers and installed dependencies."
|
||||||
|
|
||||||
|
.PHONY: up
|
||||||
|
up: # @HELP Start the dev server
|
||||||
|
up:
|
||||||
|
@docker-compose up
|
||||||
|
|
||||||
KEYBASE_FILE ?= keybase.txt
|
KEYBASE_FILE ?= keybase.txt
|
||||||
ROBOTS_FILE ?= robots.txt.staging
|
ROBOTS_FILE ?= robots.txt.staging
|
||||||
SITEURL ?= http://localhost:8000
|
SITEURL ?= http://localhost:8000
|
||||||
|
|
||||||
|
.PHONY: build
|
||||||
|
build: # @HELP Build the production assets
|
||||||
build:
|
build:
|
||||||
@docker build --build-arg siteurl=${SITEURL} --build-arg offenaccountid=${OFFEN_ACCOUNT_ID} -t offen/website -f build/Dockerfile .
|
@docker build --build-arg siteurl=${SITEURL} --build-arg offenaccountid=${OFFEN_ACCOUNT_ID} -t offen/website -f build/Dockerfile .
|
||||||
@rm -rf output && mkdir output
|
@rm -rf output && mkdir output
|
||||||
@ -31,5 +43,3 @@ build:
|
|||||||
@cp build/${ROBOTS_FILE} ./output/robots.txt
|
@cp build/${ROBOTS_FILE} ./output/robots.txt
|
||||||
@cp build/${KEYBASE_FILE} ./output/keybase.txt
|
@cp build/${KEYBASE_FILE} ./output/keybase.txt
|
||||||
@docker rm assets
|
@docker rm assets
|
||||||
|
|
||||||
.PHONY: setup build up
|
|
||||||
|
Loading…
Reference in New Issue
Block a user