chore(nix/package/docker/aio): fixes from testing phase

This commit is contained in:
sinanmohd
2025-02-24 16:57:49 +05:30
parent ffec978124
commit b31b0668a5
3 changed files with 35 additions and 12 deletions

View File

@@ -5,13 +5,16 @@ aio_env_prefix='aio_'
nocodb_env_path='/run/nocodb.dynamic.env'
acme_env_path='/run/acme.dynamic.env'
minio_env_path='/run/minio.dynamic.env'
aio_pass="TODO:gennnnnnnnnnnnnnnpass"
kernal_env_store_dir="/run/kernelenvs"
s6_services_temp_path='/run/s6-service-temp'
_aio_postgres_enable_default=true
_aio_minio_enable_default=true
_aio_ssl_domain_default="local.local"
# TODO: acme for minio, no support for proxy schema ;(
_aio_minio_enable_default=false
_aio_ssl_domain_default="localhost"
_aio_ssl_enable_default=false
log() {
@@ -72,14 +75,11 @@ env_aio_set() {
}
env_aio_act() {
# TODO
if "$aio_postgres_enable"; then
touch "$s6_services_temp_path"/nocodb-srv/dependencies.d/postgresql
cat <<- EOF >> "$nocodb_env_path"
NC_S3_ACCESS_KEY="minioadmin"
NC_S3_ACCESS_SECRET="minioadmin"
NC_S3_ENDPOINT="http://127.0.0.1:9000"
DATABASE_URL="postgresql:///nocodb?host=/run/postgresql&user=postgres"
EOF
log enabled postgresql
@@ -89,7 +89,26 @@ env_aio_act() {
touch "$s6_services_temp_path"/nocodb-srv/dependencies.d/minio
cat <<- EOF >> "$nocodb_env_path"
DATABASE_URL="postgresql:///nocodb?host=/run/postgresql&user=postgres"
NC_S3_BUCKET_NAME="aio_minio_nocodb"
NC_S3_REGION="us-east-1"
NC_S3_ACCESS_KEY="$aio_pass"
NC_S3_ACCESS_SECRET="$aio_pass"
NC_S3_FORCE_PATH_STYLE="true"
EOF
if "$aio_ssl_enable"; then
cat <<- EOF >> "$nocodb_env_path"
NC_S3_ENDPOINT="https://${aio_ssl_domain}"
EOF
else
cat <<- EOF >> "$nocodb_env_path"
NC_S3_ENDPOINT="http://localhost:9000"
EOF
fi
cat <<- EOF >> "$minio_env_path"
MINIO_ROOT_USER="$aio_pass"
MINIO_ROOT_PASSWORD="$aio_pass"
EOF
log enabled minio
@@ -121,6 +140,6 @@ env_aio_act() {
touch "$nocodb_env_path"
s6-dumpenv "$kernal_env_store_dir"
env_passthrough
env_aio_set
env_aio_act
env_passthrough