diff options
author | vnugent <public@vaughnnugent.com> | 2024-08-17 22:00:42 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2024-08-17 22:00:42 -0400 |
commit | d388c7757010156bd79d4c2fb3cc812c91a4683d (patch) | |
tree | 3a9f34287168e36ce2ec7e48c3563144eb0d92d8 /ci | |
parent | f0d91ad12e3a01118357b0cbf2aabbcd7464028f (diff) |
package and configuration update for upstream updatesnext
Diffstat (limited to 'ci')
-rw-r--r-- | ci/build.env | 30 | ||||
-rw-r--r-- | ci/compile.ps1 | 18 | ||||
-rw-r--r-- | ci/config-templates/Essentials.Accounts-template.json | 6 | ||||
-rw-r--r-- | ci/config-templates/PageRouter-template.json | 2 | ||||
-rw-r--r-- | ci/config-templates/SessionProvider-template.json | 23 | ||||
-rw-r--r-- | ci/config-templates/SimpleBookmark-template.json | 8 | ||||
-rw-r--r-- | ci/config-templates/config-template.json | 148 | ||||
-rw-r--r-- | ci/container/Dockerfile | 38 | ||||
-rw-r--r-- | ci/container/Taskfile.yaml | 37 | ||||
-rw-r--r-- | ci/container/docker-compose.yaml | 1 | ||||
-rw-r--r-- | ci/container/run.sh | 14 | ||||
-rw-r--r-- | ci/plugins.taskfile.yaml | 13 | ||||
-rw-r--r-- | ci/taskfile.yaml | 12 |
13 files changed, 173 insertions, 177 deletions
diff --git a/ci/build.env b/ci/build.env index b0933f0..5e3b8ce 100644 --- a/ci/build.env +++ b/ci/build.env @@ -18,32 +18,19 @@ COMPRESSION_LIB_PATH=lib/vnlib_compress.dll # Plugins ########## -DEBUG_PLUGINS=false -MAX_LOGIN_ATTEMPS=10 -MAX_BOOKMARKS=5000 -REG_TOKEN_DURATION_MIN=360 - ########## # HTTP ########## -#sets the absolute maxium upload size -MAX_CONTENT_LENGTH=5120000 - -HTTP_TRACE_ON=false -HTTP_DOWNSTREAM_SERVERS=[] - #default ssl dir is ssl/ -SSL_JSON={"cert": "ssl/cert.pem", "privkey":"ssl/key.pem"} +TLS_ENABLE=true +TLS_CERT=ssl/cert.pem +TLS_PRIVATE_KEY=ssl/key.pem ############# # HC VAULT ############# -HC_VAULT_ADDR= -HC_VAULT_TOKEN= -HC_VAULT_TRUST_CERT=false - ########## # SQL ########## @@ -57,20 +44,9 @@ SQL_CONNECTION_STRING=Data Source=data/simple-bookmark.db; ############## CACHE_ASM_PATH=VNLib.Data.Caching.Providers.VNCache.dll -REDIS_CONNECTION_STRING= -VNCACHE_INITIAL_NODES=[] - -#for self contained apps, memcache needs to be true -MEMCACHE_ONLY=true ############ # SECRETS ############ PASSWORD_PEPPER=file://secrets/password-pepper.txt -DATABASE_PASSWORD= -REDIS_PASSWORD= - -#no cache, so clear vars -VNCACHE_CLIENT_PRIVATE_KEY= -VNCACHE_CACHE_PUBLIC_KEY=
\ No newline at end of file diff --git a/ci/compile.ps1 b/ci/compile.ps1 index 2858d06..459f304 100644 --- a/ci/compile.ps1 +++ b/ci/compile.ps1 @@ -5,15 +5,19 @@ $templateFiles = Get-ChildItem -Path $inputDir -Filter "*-template.json" -File foreach ($file in $templateFiles) { $baseFilename = $file.BaseName + '.json' $templateFilePath = $file.FullName - - #remove the -template.json suffix - $outputFilePath = Join-Path -Path $outputDir -ChildPath $baseFilename.replace("-template","") - #substitute environment variables for file variables - Get-Content $templateFilePath | ForEach-Object { - if ($_ -match "\$\{((\w+))\}") + #remove the -template.json suffix + $outputFilePath = Join-Path -Path $outputDir -ChildPath $baseFilename.replace("-template","") + + #substitute environment variables for file variables + Get-Content $templateFilePath | ForEach-Object { + if ($_ -match "\$\{(\w+)(:-([^\}]+))?\}") { - $_ -replace "\$\{(\w+)\}",$([Environment]::GetEnvironmentVariable($Matches[1])) + $varName = $Matches[1] + $defaultValue = if ($Matches[3]) { $Matches[3] } else { '' } + $envValue = [Environment]::GetEnvironmentVariable($varName) + if (!$envValue) { $envValue = $defaultValue } + $_ -replace "\$\{(\w+)(:-([^\}]+))?\}", $envValue } else { diff --git a/ci/config-templates/Essentials.Accounts-template.json b/ci/config-templates/Essentials.Accounts-template.json index 54e9b58..eba3528 100644 --- a/ci/config-templates/Essentials.Accounts-template.json +++ b/ci/config-templates/Essentials.Accounts-template.json @@ -1,12 +1,12 @@ { - "debug": ${DEBUG_PLUGINS}, + "debug": ${DEBUG_PLUGINS:-false}, //Enables obnoxious debug logging //endpoints "login_endpoint": { "path": "/api/account/login", - "max_login_attempts": ${MAX_LOGIN_ATTEMPS}, //10 failed attempts in 10 minutes - "failed_attempt_timeout_sec": 600 //10 minutes + "max_login_attempts": ${MAX_LOGIN_ATTEMPS:-10}, //10 failed attempts in 10 minutes + "failed_attempt_timeout_sec": 600 //10 minutes }, "keepalive_endpoint": { diff --git a/ci/config-templates/PageRouter-template.json b/ci/config-templates/PageRouter-template.json index 86a51f8..7fe27c1 100644 --- a/ci/config-templates/PageRouter-template.json +++ b/ci/config-templates/PageRouter-template.json @@ -1,5 +1,5 @@ { - "debug": ${DEBUG_PLUGINS}, + "debug": ${DEBUG_PLUGINS:-false}, //Enables obnoxious debug logging "store": { //All builds require the routes.xml file in the config directory even after variable substitution "route_file": "config/routes.xml" diff --git a/ci/config-templates/SessionProvider-template.json b/ci/config-templates/SessionProvider-template.json index 328f06f..b855bc8 100644 --- a/ci/config-templates/SessionProvider-template.json +++ b/ci/config-templates/SessionProvider-template.json @@ -1,25 +1,20 @@ { - "debug": ${DEBUG_PLUGINS}, + "debug": ${DEBUG_PLUGINS:-false}, //Enables obnoxious debug logging //Provider assemblies to load "provider_assemblies": [ "VNLib.Plugins.Sessions.VNCache.dll" ], //Web session provider, valid format for VNCache and also memory sessions "web": { - //Cache system key prefix - "cache_prefix": "websessions", - //The session cookie name - "cookie_name": "sb-session", - //Size in bytes for generated session ids - "cookie_size": 40, - //time (in seconds) a session is valid for - "valid_for_sec": 3600, - //The maxium number of connections waiting for the cache server responses - "max_waiting_connections": 100, - //Enforce strict cross-origin session checks - "strict_cors": true, + + "cache_prefix": "websessions", //Cache system key prefix + "cookie_name": "sb-session", //The session cookie name + "cookie_size": 40, //Size in bytes for generated session ids + "valid_for_sec": 3600, //time (in seconds) a session is valid for + "max_waiting_connections": 100, //The maxium number of connections waiting for the cache server responses + ///Enforces strict TLS to help prevent tls downgrades based on stored session variables (privacy note: this can be leaked through brute-forced if session id is stolen) - "strict_tls_protocol": true + "strict_tls_protocol": ${SESSION_STRICT_TLS:-true} } }
\ No newline at end of file diff --git a/ci/config-templates/SimpleBookmark-template.json b/ci/config-templates/SimpleBookmark-template.json index 8736d8d..dcbf701 100644 --- a/ci/config-templates/SimpleBookmark-template.json +++ b/ci/config-templates/SimpleBookmark-template.json @@ -1,7 +1,7 @@ { //Comments are allowed - "debug": ${DEBUG_PLUGINS}, //Enables obnoxious debug logging + "debug": ${DEBUG_PLUGINS:-false}, //Enables obnoxious debug logging "bm_endpoint": { @@ -10,7 +10,7 @@ "config": { "max_limit": 100, //Max results per page "default_limit": 20, //Default results per page - "user_quota": ${MAX_BOOKMARKS} //Max bookmarks per user + "user_quota": ${MAX_BOOKMARKS:-5000} //Max bookmarks per user } }, @@ -29,7 +29,7 @@ "registration": { "path": "/api/register", //Path for the registration endpoint - "token_lifetime_mins": ${REG_TOKEN_DURATION_MIN}, //Token lifetime in minutes - "key_regen_interval_mins": ${REG_TOKEN_DURATION_MIN}0 //Signing key regeneration interval in minutes + "token_lifetime_mins": ${REG_TOKEN_DURATION_MIN:-360}, //Token lifetime in minutes + "key_regen_interval_mins": ${REG_TOKEN_DURATION_MIN:-360}0 //Signing key regeneration interval in minutes } }
\ No newline at end of file diff --git a/ci/config-templates/config-template.json b/ci/config-templates/config-template.json index 7055678..1573461 100644 --- a/ci/config-templates/config-template.json +++ b/ci/config-templates/config-template.json @@ -3,41 +3,38 @@ //Host application config, config is loaded as a read-only DOM that is available //to the host and loaded child plugins, all elements are available to plugins via the 'HostConfig' property - "http": { - //The defaut HTTP version to being requests with (does not support http/2 yet) - "default_version": "HTTP/1.1", - //The maxium size (in bytes) of response messges that will be compressed - "compression_limit": 512000, - //Minium response size (in bytes) to compress - "compression_minimum": 2048, - //The size of the buffer to use when parsing multipart/form data uploads - "multipart_max_buf_size": 8192, - //The maxium ammount of data (in bytes) allows for mulitpart/form data file uploads - "multipart_max_size": 80240, - //Absolute maximum size (in bytes) of the request entity body (exludes headers) - "max_entity_size": ${MAX_CONTENT_LENGTH}, - //Keepalive ms for HTTP1.1 keepalive connections - "keepalive_ms": 1000000, - //The buffer size to use when parsing headers (also the maxium request header size allowed) - "header_buf_size": 8128, - //The maxium number of headers allowed in an HTTP request message - "max_request_header_count": 50, - //The maxium number of allowed network connections, before 503s will be issued automatically and connections closed - "max_connections": 5000, - //The size in bytes of the buffer to use when writing response messages - "response_buf_size": 65536, - //time (in ms) to wait for a response from an active connection in recv mode, before dropping it - "recv_timeout_ms": 5000, - //Time in ms to wait for the client to accept transport data before terminating the connection - "send_timeout_ms": 60000, - //The size (in bytes) of the buffer used to store all response header data - "response_header_buf_size": 16384, - //Max number of file uploads allowed per request - "max_uploads_per_request": 10 + "tcp": { + "keepalive_sec": 0, //How long to wait for a keepalive response before closing the connection (0 to disable tcp keepalive) + "keepalive_interval_sec": 0, //How long to wait between keepalive probes + "max_recv_size": 655360, //640k absolute maximum recv buffer (defaults to OS socket buffer size) + "max_connections": ${HTTP_MAX_CONS:-5000}0, //Per listener instance + "backlog": 1000, //OS socket backlog, + + "tx_buffer": 65536, //OS socket send buffer size 64k is a good default + "rx_buffer": 65536 //OS socket recv buffer size 64k is a good default }, - //Compression is installed in the container at lib/ directory along with the native library supporting gzip and brotli - "compression_lib": "lib/vnlib.net.compression/VNLib.Net.Compression.dll", + "http": { + "default_version": "HTTP/1.1", //The defaut HTTP version to being requests with (does not support http/2 yet) + "multipart_max_buf_size": 8192, //The size of the buffer to use when parsing multipart/form data uploads + "multipart_max_size": 80240, //The maxium ammount of data (in bytes) allows for mulitpart/form data file uploads + "max_entity_size": ${MAX_CONTENT_LENGTH:-5120000}, //Absolute maximum size (in bytes) of the request entity body (exludes headers) + "header_buf_size": 8128, //The buffer size to use when parsing headers (also the maxium request header size allowed) + "max_request_header_count": 50, //The maxium number of headers allowed in an HTTP request message + "max_connections":${HTTP_MAX_CONS:-5000}, //The maxium number of allowed network connections, before 503s will be issued automatically and connections closed + "response_header_buf_size": 8128, //The size (in bytes) of the buffer used to store all response header data + "max_uploads_per_request": 10, //Max number of multi-part file uploads allowed per request + "keepalive_ms": 1000000, //Keepalive ms for HTTP1.1 keepalive connections + "recv_timeout_ms": 5000, //time (in ms) to wait for a response from an active connection in recv mode, before dropping it + "send_timeout_ms": 60000, //Time in ms to wait for the client to accept transport data before terminating the connection + + "compression": { + "enabled": ${COMPRESSION_ON:-true}, //controls compression globally + "assembly": "lib/vnlib.net.compression/VNLib.Net.Compression.dll", //A custom assembly path (ex: 'VNLib.Net.Compression.dll') + "max_size": ${COMPRESSION_MAX:-512000}, //Maxium size of a response to compress before it's bypassed + "min_size": ${COMPRESSION_MIN:-2048} //Minium size of a response to compress, if smaller compression is bypassed + } + }, //Setup the native lib "vnlib.net.compression": { @@ -45,24 +42,30 @@ "level": 1 }, - - //Maxium ammount of time a request is allowed to be processed (includes loading or waiting for sessions) before operations will be cancelled and a 503 returned - "max_execution_time_ms": 20000, - //Collection of objects to define hosts+interfaces to build server listeners from "virtual_hosts": [ { - "trace": ${HTTP_TRACE_ON}, + "trace": ${HTTP_TRACE_ON:-false}, + "force_port_check": false, //disable port checking by default (useful for containers) //The interface to bind to, you may not mix TLS and non-TLS connections on the same interface - "interface": { - "address": "0.0.0.0", - "port": 8080 - }, + "interfaces": [ + { + "address": "0.0.0.0", + "port": ${HTTP_PORT:-8080}, + + "ssl": ${TLS_ENABLE:-true}, //Enables TLS for this interface for this host specifically + "certificate": "${TLS_CERT}", //Cert may be pem or pfx (include private key in pfx, or include private key in a pem file) + "private_key": "${TLS_PRIVATE_KEY}", //A pem encoded private key, REQUIRED if using a PEM certificate, may be encrypted with a password + "password": null, //An optional password for the ssl private key + "client_cert_required": false, //requires that any client connecting to this host present a valid certificate + "use_os_ciphers": false //Use the OS's ciphers instead of the hard-coded ciphers + } + ], //Collection of "trusted" servers to allow proxy header support from - "downstream_servers": ${HTTP_DOWNSTREAM_SERVERS}, + "downstream_servers": ${HTTP_DOWNSTREAM_SERVERS:-[]}, //The hostname to listen for, "*" as wildcard, and "[system]" as the default hostname for the current machine "hostname": "*", @@ -76,16 +79,31 @@ //A list of error file objects, files are loaded into memory (and watched for changes) and returned when the specified error code occurs "error_files": [], - //The default - "cache_default_sec": 864000, + "cors": { + "enabled": false, //Enables cors protections for this host + "deny_cors_connections": false, //If true, all cors connections will be denied + "allowed_origins": [ ] + }, + + //Key-value headers object, some headers are special and are controlled by the vh processor + "headers": { + "Server": "Simple-Bookmark-Server", + "X-Frame-Options": "DENY", + "X-Content-Type-Options": "nosniff", + "X-XSS-Protection": "1; mode=block", + }, - "ssl": ${SSL_JSON}, + //The default + "cache_default_sec": 864000, + //Maxium ammount of time a request is allowed to be processed (includes loading or waiting for sessions) before operations will be cancelled and a 503 returned + "max_execution_time_ms": 20000, } ], //Defines the directory where plugin's are to be loaded from "plugins": { + "enabled": true, //Hot-reload creates collectable assemblies that allow full re-load support in the host application, should only be used for development purposes! "hot_reload": false, "path": "plugins/", @@ -93,27 +111,31 @@ "assets": "plugins/assets/" }, - "sys_log": { - "path": "data/logs/sys-log.txt", - "flush_sec": 5, - "retained_files": 31, - "file_size_limit": 10485760, - "interval": "infinite" - }, - - "app_log": { - "path": "data/logs/app-log.txt", - "flush_sec": 5, - "retained_files": 31, - "file_size_limit": 10485760, - "interval": "infinite" + "logs":{ + "sys_log": { + "enabled": ${LOG_ENABLE_FILES:-true}, + "path": "data/logs/sys-log.txt", + "flush_sec": 5, + "retained_files": 31, + "file_size_limit": 10485760, + "interval": "infinite" + }, + + "app_log": { + "enabled": ${LOG_ENABLE_FILES:-true}, + "path": "data/logs/app-log.txt", + "flush_sec": 5, + "retained_files": 31, + "file_size_limit": 10485760, + "interval": "infinite" + } }, //HASHICORP VAULT "hashicorp_vault": { "url": "${HC_VAULT_ADDR}", "token": "${HC_VAULT_TOKEN}", - "trust_certificate": ${HC_VAULT_TRUST_CERT}, + "trust_certificate": ${HC_VAULT_TRUST_CERT:-false}, }, //SQL CONFIG @@ -139,13 +161,13 @@ "discovery_interval_sec": 120, //Initial nodes to discover from - "initial_nodes": ${VNCACHE_INITIAL_NODES}, + "initial_nodes": ${VNCACHE_INITIAL_NODES:-[]}, //Disable TLS "use_tls": false, //Setting this value to true will cause the cache store to load a memory-only instance, without remote backing - "memory_only": ${MEMCACHE_ONLY}, + "memory_only": ${MEMCACHE_ONLY:-true}, //enable memory cache "memory_cache": { diff --git a/ci/container/Dockerfile b/ci/container/Dockerfile index f8cdfa3..84a4fc1 100644 --- a/ci/container/Dockerfile +++ b/ci/container/Dockerfile @@ -34,7 +34,7 @@ COPY --from=native-cont /build/out /app/lib #copy self signed ssl certs for first startup COPY --from=native-cont /build/ssl /app/ssl -RUN apk update && apk add --no-cache gettext icu-libs dumb-init curl +RUN apk update && apk add --no-cache icu-libs dumb-init curl #workdir WORKDIR /app @@ -55,45 +55,17 @@ ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=0 ENV VNLIB_ARGON2_DLL_PATH=/app/lib/libargon2.so \ COMPRESSION_LIB_PATH=/app/lib/libvn_compress.so -#set default env variables -ENV MAX_BOOKMARKS=5000 \ - MAX_CONTENT_LENGTH=5120000 \ - REG_TOKEN_DURATION_MIN=360 \ - MAX_LOGIN_ATTEMPS=10 - #SQL Config ENV SQL_LIB_PATH=VNLib.Plugins.Extensions.Sql.SQLite.dll ENV SQL_CONNECTION_STRING="Data Source=data/simple-bookmark.db;" - -#HC Vault -ENV HC_VAULT_ADDR="" \ - HC_VAULT_TOKEN="" \ - HC_VAULT_TRUST_CERT=false - #VNCACHE (default to memory only) -ENV CACHE_ASM_PATH=VNLib.Data.Caching.Providers.VNCache.dll \ - MEMCACHE_ONLY=true \ - REDIS_CONNECTION_STRING="" \ - VNCACHE_INITIAL_NODES=[] - -#SECRETS -ENV PASSWORD_PEPPER="" \ - DATABASE_PASSWORD="" \ - REDIS_PASSWORD="" \ - VNCACHE_CLIENT_PRIVATE_KEY="" \ - VNCACHE_CACHE_PUBLIC_KEY="" - - -#HTTP/PROXY Config -ENV HTTP_DOWNSTREAM_SERVERS=[] \ - HTTP_TRACE_ON=false +ENV CACHE_ASM_PATH=VNLib.Data.Caching.Providers.VNCache.dll #set default certificate files to the self signed ones created in the build container -ENV SSL_JSON='{"cert": "ssl/cert.pem", "privkey":"ssl/key.pem"}' - -#disable plugin debugging by default -ENV DEBUG_PLUGINS=false +ENV TLS_ENABLE=true \ +TLS_CERT=ssl/cert.pem \ +TLS_PRIVATE_KEY=ssl/key.pem #run the init script within dumb-init ENTRYPOINT ["dumb-init", "--"] diff --git a/ci/container/Taskfile.yaml b/ci/container/Taskfile.yaml index 40c08ea..c497c3e 100644 --- a/ci/container/Taskfile.yaml +++ b/ci/container/Taskfile.yaml @@ -9,6 +9,8 @@ version: "3" vars: INCLUDE_FILES: "Dockerfile, docker-compose.yaml" CERT_KEY_PARAMS: "ec -pkeyopt ec_paramgen_curve:secp384r1" + OUT_DIR: "{{.USER_WORKING_DIR}}/out" + SSL_DIR: "{{.USER_WORKING_DIR}}/ssl" includes: install: @@ -18,20 +20,37 @@ includes: tasks: #called from inside the container to build native libraries build-libs: - vars: - OUT_DIR: "{{.USER_WORKING_DIR}}/out" - SSL_DIR: "{{.USER_WORKING_DIR}}/ssl" - HOSTNAME: - sh: echo $HOSTNAME + deps: + - task: build_rpmalloc + - task: build_argon2 + - task: build_compres + - task: create_cert + build_rpmalloc: + internal: true cmds: - #build argon2 native library - - cd lib/argon2/ && task && cp build/libargon2.so {{.OUT_DIR}}/libargon2.so #build rpmalloc library and rewrite to a standard .dll extension - - cd lib/vnlib_rpmalloc/ && task && cp build/libvn_rpmalloc.so {{.OUT_DIR}}/libvn_rpmalloc.so + - cmd: cd lib/vnlib_rpmalloc/ && task && cp build/libvn_rpmalloc.so {{.OUT_DIR}}/libvn_rpmalloc.so + + build_argon2: + internal: true + cmds: + #build argon2 native library + - cmd: cd lib/argon2/ && task && cp build/libargon2.so {{.OUT_DIR}}/libargon2.so + + build_compress: + internal: true + cmds: #build compression and rewrite to a standard .dll extension - - cd lib/vnlib_compress/ && task && cp build/libvn_compress.so {{.OUT_DIR}}/libvn_compress.so + - cmd: cd lib/vnlib_compress/ && task && cp build/libvn_compress.so {{.OUT_DIR}}/libvn_compress.so + create_cert: + internal: true + vars: + HOSTNAME: + sh: echo $HOSTNAME + + cmds: #create a fresh self-signed cert for the container during build - openssl req -new -x509 -days 365 -keyout {{.SSL_DIR}}/key.pem -out {{.SSL_DIR}}/cert.pem -newkey {{.CERT_KEY_PARAMS}} --nodes -subj "/CN={{.HOSTNAME}}" - echo "WARNING Self signed certificate created during build stage, DO NOT COPY THIS IMAGE" diff --git a/ci/container/docker-compose.yaml b/ci/container/docker-compose.yaml index 65eebdc..b41bff9 100644 --- a/ci/container/docker-compose.yaml +++ b/ci/container/docker-compose.yaml @@ -56,6 +56,7 @@ services: VNCACHE_CACHE_PUBLIC_KEY: "" #HTTP + HTTP_PORT: "8080" HTTP_DOWNSTREAM_SERVERS: '[]' #a comma separated list of downstream (proxy) server ip addresses HTTP_TRACE_ON: "false" #enable http trace logging, requires you to set --debug to SERVER_ARGS variable below diff --git a/ci/container/run.sh b/ci/container/run.sh index d829509..8e4f3cd 100644 --- a/ci/container/run.sh +++ b/ci/container/run.sh @@ -2,6 +2,18 @@ #this script will be invoked by dumb-init in the container on statup and is located at /app +substitute_config_file() { + local templateFilePath="$1" + local outputFilePath="$2" + + # Substitute environment variables with their values or default values + while IFS= read -r line; do + # Use pattern matching and parameter expansion to handle defaults + modifiedLine=$(echo "$line" | sed -E 's/\$\{([^:-]+)(:-([^}]+))?\}/$(echo "${\1:-\3}")/ge') + eval "echo \"$modifiedLine\"" + done < "$templateFilePath" > "$outputFilePath" +} + echo "Generating configuration files" rm -rf config && mkdir config @@ -11,7 +23,7 @@ cp config-templates/routes.xml config/routes.xml #substitude all -template files in the config-templates dir and write them to the config dir for file in config-templates/*-template.json; do - envsubst < $file > config/$(basename $file -template.json).json + substitute_config_file $file config/$(basename $file -template.json).json done echo "Complete" diff --git a/ci/plugins.taskfile.yaml b/ci/plugins.taskfile.yaml index 17b3036..a06f3ba 100644 --- a/ci/plugins.taskfile.yaml +++ b/ci/plugins.taskfile.yaml @@ -11,12 +11,12 @@ includes: vars: PLUGIN_NAME: 'SimpleBookmark' - CORE_VERSION: '1b590c2517fef110564943ed8a10edd11fa758b0' + CORE_VERSION: '0419f315e5689e043f311203ab8e61f69f1ee1d6' ESSENTIALS_VERSION: '451091e93b5feee7a5e01d3a81f5d63efa7ea8be' CACHE_VERSION: '930980a1e6b5db24dd4d8beeb115e4279ea79ee2' - USERS_VERSION: '6d48be92c39d0046c5d827fb86af7ea1f3877e69' - SESSION_VERSION: 'f2dedded2a8646273c4dd13013b8334d64e02d6f' - EXTENSIONS_VERSION: '1350c983c371fdd6a93596c8474345f9168284e1' + USERS_VERSION: '26adc7c79b1bd732c76a7c0ab3638294f697ab03' + SESSION_VERSION: '34902c086d1707707b806864363cfaee317213e2' + EXTENSIONS_VERSION: '641bdbe75cb0128c09e27f1b92709c86574026ac' tasks: @@ -179,11 +179,6 @@ tasks: DIR: './lib/argon2' VERSION: '{{.CORE_VERSION}}' - #remove unneeded files - - for: [ man, latex, kats, argon2-specs.pdf ] - cmd: powershell -Command "rm ./lib/argon2/{{.ITEM}} -Recurse" - ignore_error: true - install-rpmalloc: cmds: #install the rpmalloc source code package for Linux and Mac diff --git a/ci/taskfile.yaml b/ci/taskfile.yaml index 0221bc9..4eba99a 100644 --- a/ci/taskfile.yaml +++ b/ci/taskfile.yaml @@ -8,7 +8,7 @@ version: "3" vars: BUILDS_URL: https://www.vaughnnugent.com/public/resources/software/builds SQLITE_OUT_DIR: "plugins/assets/VNLib.Plugins.Extensions.Loading.Sql.SQLite" - WEBSERVER_VERSION: 'a54c9d0da36ee15b5a1b6852b843bc0a40694ce5' + WEBSERVER_VERSION: '0419f315e5689e043f311203ab8e61f69f1ee1d6' includes: install: @@ -57,7 +57,7 @@ tasks: - task: install:install vars: PROJECT_NAME: 'VNLib.Webserver' - MODULE_NAME: "VNLib.Webserver" + MODULE_NAME: "VNLib.Core" FILE_NAME: "linux-x64-release.tgz" DIR: 'webserver/' VERSION: '{{.WEBSERVER_VERSION}}' @@ -138,10 +138,10 @@ tasks: internal: false dotenv: ['build.env'] #use the local .env file when compiling config variables cmds: - - cmd: powershell mkdir config/ -Force - ignore_error: true - - cmd: powershell './compile.ps1' -InputDir config-templates/ -OutputDir config/ - - cmd: powershell cp config-templates/routes.xml config/routes.xml -Force + - cmd: powershell mkdir config/ -Force + ignore_error: true + - cmd: powershell './compile.ps1' -InputDir config-templates/ -OutputDir config/ + - cmd: powershell cp config-templates/routes.xml config/routes.xml -Force prune-plugin-libs: cmds: |