aboutsummaryrefslogtreecommitdiff
path: root/ci/container
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-06-06 21:31:30 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2024-06-06 21:31:30 -0400
commit9d1df65d99732a68b4fe96dcc75273442cbd322f (patch)
tree9a28619f6caaf68d47ea0e620c62da3ea3aeaf81 /ci/container
parent5ecd6b39cccdc9500540b10685605b5fcba61f69 (diff)
fix: Some container fixes and compatability
Diffstat (limited to 'ci/container')
-rw-r--r--ci/container/Dockerfile3
-rw-r--r--ci/container/Taskfile.yaml24
-rw-r--r--ci/container/docker-compose.yaml4
3 files changed, 16 insertions, 15 deletions
diff --git a/ci/container/Dockerfile b/ci/container/Dockerfile
index 8ae12f6..5268448 100644
--- a/ci/container/Dockerfile
+++ b/ci/container/Dockerfile
@@ -52,7 +52,8 @@ ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=0
#add helper/required libraries
#ENV VNLIB_SHARED_HEAP_FILE_PATH=/app/lib/libvn_rpmalloc.so not ready yet, still need to debug
-ENV VNLIB_ARGON2_DLL_PATH=/app/lib/libargon2.so
+ENV VNLIB_ARGON2_DLL_PATH=/app/lib/libargon2.so \
+ COMPRESSION_LIB_PATH=/app/lib/libvn_compress.so
#set default env variables
ENV MAX_CONTENT_LENGTH=204800000 \
diff --git a/ci/container/Taskfile.yaml b/ci/container/Taskfile.yaml
index 5987eaa..0b959ab 100644
--- a/ci/container/Taskfile.yaml
+++ b/ci/container/Taskfile.yaml
@@ -8,6 +8,7 @@ version: "3"
vars:
INCLUDE_FILES: "Dockerfile, docker-compose.yaml"
+ CERT_KEY_PARAMS: "ec -pkeyopt ec_paramgen_curve:secp384r1"
includes:
install:
@@ -19,22 +20,21 @@ tasks:
build-libs:
vars:
OUT_DIR: "{{.USER_WORKING_DIR}}/out"
-
- #build stage generates the following libraries
- generates:
- - "{{.USER_WORKING_DIR}}/out/libargon2.so"
- - "{{.USER_WORKING_DIR}}/out/libvn_rpmalloc.so"
- - "{{.USER_WORKING_DIR}}/out/libvn_compress.so"
-
+ SSL_DIR: "{{.USER_WORKING_DIR}}/ssl"
+ HOSTNAME:
+ sh: echo $HOSTNAME
+
cmds:
#build argon2 native library
- cd lib/argon2/ && task && cp build/libargon2.so {{.OUT_DIR}}/libargon2.so
- #build rpmalloc library
- - cd lib/vnlib_rpmalloc/ && task && cp build/libvn_rpmalloc.so {{.OUT_DIR}}/libvn_rpmalloc.so
- #install zlib and brotli native libraries from the source repos
+ #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
+ #build compression and rewrite to a standard .dll extension
- cd lib/vnlib_compress/ && task && cp build/libvn_compress.so {{.OUT_DIR}}/libvn_compress.so
- #build native compression lib and put in lib dir
- - cd lib/vnlib_compress && cmake -B./build && cmake --build build/ --config Release && cp build/libvn_compress.so {{.OUT_DIR}}/libvn_compress.so
+
+ #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"
#called from ci pipline to build the package
build:
diff --git a/ci/container/docker-compose.yaml b/ci/container/docker-compose.yaml
index 5a029c6..9bd1fc1 100644
--- a/ci/container/docker-compose.yaml
+++ b/ci/container/docker-compose.yaml
@@ -20,7 +20,7 @@ services:
CHANNEL_INDEX_FILE: "channels.json" #required, should leave default unless you know what you are doing
MAX_CONTENT_LENGTH: 204800000 #200MB max upload size
MAX_LOGIN_ATTEMPS: "10" #max login attempts before user account is locked out
-
+
#SQL Config
SQL_LIB_PATH: "VNLib.Plugins.Extensions.Sql.SQLite.dll"
SQL_CONNECTION_STRING: "Data Source=data/cmnext.db;" #when using a password, simply leave the password field blank
@@ -69,5 +69,5 @@ services:
#Very Verbose plugin logging, required --debug CLI flag, prints literally everything to the logger (it's annoying)
DEBUG_PLUGINS: "false"
- SERVER_ARGS: "--setup" #remove the setup flag after you are done setting up the server
+ SERVER_ARGS: ""