Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# 0.1.3

## What's new

* Enable gzip compression for static resources

## Fixes

## Changes

* Update tui-app to 0.1.3
* Update tui-server to 0.1.1

# 0.1.2

## What's new
Expand Down
23 changes: 20 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ EXTERNAL_CONFIG_NAME=tiny-webui-$(TARGET_PLATFORM)_defconfig
OUTPUT_DIR=output
IMAGE_OUTPUT_DIR=$(OUTPUT_DIR)/$(TARGET_PLATFORM)

REGISTRY_HOST?=127.0.0.1
REGISTRY_PORT?=5000
REGISTRY_NAME?=registry
REGISTRY_IMAGE?=registry:2
IMAGE_NAME?=tiny-webui
IMAGE_TAG?=latest
REGISTRY_REF=$(REGISTRY_HOST):$(REGISTRY_PORT)/$(IMAGE_NAME):$(IMAGE_TAG)

BUILDX_BUILDER?=tui-builder

all:docker-image

.PHONY:config
Expand Down Expand Up @@ -34,12 +44,19 @@ docker-image:
$(MAKE) image TARGET_PLATFORM=arm64
rm -rf $(OUTPUT_DIR)/amd64
ln -sf x64 $(OUTPUT_DIR)/amd64
docker buildx create || true
@if docker ps -a --format '{{.Names}}' | grep -qx '$(REGISTRY_NAME)'; then \
docker inspect -f '{{.State.Running}}' '$(REGISTRY_NAME)' 2>/dev/null | grep -qx true || docker start '$(REGISTRY_NAME)' >/dev/null; \
else \
docker run -d -p '$(REGISTRY_PORT):5000' --name '$(REGISTRY_NAME)' '$(REGISTRY_IMAGE)' >/dev/null; \
fi
@docker buildx inspect '$(BUILDX_BUILDER)' >/dev/null 2>&1 || \
docker buildx create --name '$(BUILDX_BUILDER)' --driver docker-container --driver-opt network=host --use >/dev/null
@docker buildx use '$(BUILDX_BUILDER)' >/dev/null
docker buildx build \
--platform linux/amd64,linux/arm64 \
-f docker/Dockerfile \
-t tiny-webui:latest \
--output type=oci,dest=$(OUTPUT_DIR)/tiny-webui.tar \
-t $(REGISTRY_REF) \
--push \
.

.PHONY:dl_cache
Expand Down
18 changes: 18 additions & 0 deletions external/overlay/etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@ http {
default_type application/octet-stream;
sendfile on;

# gzip compression
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_min_length 1024;
gzip_http_version 1.1;
gzip_types
text/plain
text/css
text/xml
application/json
application/javascript
application/xml
application/xml+rss
image/svg+xml;

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
Expand Down
4 changes: 2 additions & 2 deletions external/package/tui-app/tui-app.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
################################################################################

TUI_APP_VERSION = 0.1.1
TUI_APP_VERSION = 0.1.3
TUI_APP_SITE = https://github.com/tiny-webui/webapp.git
TUI_APP_SITE_METHOD = git
TUI_APP_GIT_SUBMODULES = YES
Expand All @@ -13,7 +13,7 @@ TUI_APP_INSTALL_TARGET = YES

define TUI_APP_BUILD_CMDS
npm i --prefix $(@D)
npm run build:static --prefix $(@D)
npm run build --prefix $(@D)
endef

# TODO: pre gzip the appropriate files
Expand Down
2 changes: 1 addition & 1 deletion external/package/tui-server/tui-server.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
################################################################################


TUI_SERVER_VERSION = 0.1.0
TUI_SERVER_VERSION = 0.1.1
TUI_SERVER_SITE = https://github.com/tiny-webui/server.git
TUI_SERVER_SITE_METHOD = git
TUI_SERVER_INSTALL_STAGING = NO
Expand Down