diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 487d46d..c3c4d60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,6 +86,8 @@ jobs: sed -i 's/ unofficial/ oversea/' ib/Makefile ls packages/all | cut -d "_" -f 1 | xargs -n1 sh -c 'rm ib/packages/$0*.ipk' cp packages/all/*.ipk ib/packages/ + mkdir -p ib/files + cp -a files/all/* ib/files case ${IB_URL} in *x86*) cp src/repositories_x86_64.conf ib/repositories.conf @@ -108,7 +110,7 @@ jobs: - name: Build run: | echo "istoreos-intl - *" >> ib/target.manifest - cd ib && make -f multi.mk image_multi + cd ib && make -f multi.mk image_multi FILES="files" - name: Pack run: | diff --git a/files/all/etc/config/nginx b/files/all/etc/config/nginx new file mode 100644 index 0000000..09924ca --- /dev/null +++ b/files/all/etc/config/nginx @@ -0,0 +1,24 @@ + +config main global + option uci_enable 'true' + +config server '_lan' + list listen '443 ssl default_server' + list listen '[::]:443 ssl default_server' + option server_name '_lan' + list include 'restrict_locally' + list include 'conf.d/*.locations' + option uci_manage_ssl 'self-signed' + option ssl_certificate '/etc/nginx/conf.d/_lan.crt' + option ssl_certificate_key '/etc/nginx/conf.d/_lan.key' + option ssl_session_cache 'shared:SSL:32k' + option ssl_session_timeout '64m' + option access_log 'off; # logd openwrt' + +config server '_lan80' + list listen '80' + list listen '[::]:80' + option server_name '_lan80' + list include 'restrict_locally' + list include 'conf.d/*.locations' + option access_log 'off; # logd openwrt' \ No newline at end of file diff --git a/files/all/etc/nginx/uci.conf.template b/files/all/etc/nginx/uci.conf.template new file mode 100644 index 0000000..6710207 --- /dev/null +++ b/files/all/etc/nginx/uci.conf.template @@ -0,0 +1,32 @@ +# Consider using UCI or creating files in /etc/nginx/conf.d/ for configuration. +# Parsing UCI configuration is skipped if uci set nginx.global.uci_enable=false +# For details see: https://openwrt.org/docs/guide-user/services/webserver/nginx + +worker_processes auto; + +user root; + +events {} + +http { + access_log off; + log_format openwrt + '$request_method $scheme://$host$request_uri => $status' + ' (${body_bytes_sent}B in ${request_time}s) <- $http_referer'; + + include mime.types; + default_type application/octet-stream; + sendfile on; + + client_max_body_size 32k; + large_client_header_buffers 4 32k; + + gzip on; + gzip_vary on; + gzip_proxied any; + + root /www; + + #UCI_HTTP_CONFIG + include conf.d/*.conf; +} diff --git a/src/multi.mk b/src/multi.mk index aa364a2..64388aa 100644 --- a/src/multi.mk +++ b/src/multi.mk @@ -32,7 +32,8 @@ image_multi: $(MAKE) -s _check_profile $(MAKE) -s _check_keys (unset PROFILE FILES PACKAGES MAKEFLAGS; \ - $(MAKE) -f multi.mk -s _call_image_multi ) + $(MAKE) -f multi.mk -s _call_image_multi \ + $(if $(FILES),USER_FILES="$(FILES)") ) profiles_multi: @$(STAGING_DIR_HOST)/bin/sed -n 's/^CONFIG_TARGET_$(if $(CONFIG_TARGET_MULTI_PROFILE),DEVICE_)$(call target_conf,$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET)))_\(.*\)=y/\1/p' .config