Static asset magnification for the Website service (#20)
This PR contains the work done for build-time optimization of the static assets served by the Website service. The production Docker image now ships minified JS/CSS and losslessly recompressed images, while the sources in the repository stay readable and un-minified. Reviewed-on: rock-n-code/loud-amsterdam#20 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
This commit is contained in:
@@ -105,6 +105,17 @@ db-reset: ## Stop and remove the local database instance and delete its data vol
|
||||
--profile database down mariadb \
|
||||
--volumes
|
||||
|
||||
# --- Assets minification ------------------------------------------------------
|
||||
|
||||
.PHONY: ast-minify
|
||||
ast-minify: ## Preview the minified JS/CSS assets in .build/minified
|
||||
@docker build \
|
||||
--target assets-export \
|
||||
--output .build/minified \
|
||||
--file Dockerfile \
|
||||
../..
|
||||
@echo "Minified assets written to .build/minified"
|
||||
|
||||
# --- Registry deployment ------------------------------------------------------
|
||||
|
||||
.PHONY: img-check
|
||||
|
||||
Reference in New Issue
Block a user