-
Notifications
You must be signed in to change notification settings - Fork 9
feat: Introduction of DDE_DATA_HOME and Path Adjustments
#65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| _createDataHome() { | ||
| # Check if DDE_DATA_HOME is set | ||
| if [ -z "$DDE_DATA_HOME" ]; then | ||
| _logRed "DDE_DATA_HOME is not set." | ||
| return 1 | ||
| fi | ||
|
|
||
| # Create the main directory if it doesn't exist | ||
| if [ ! -d "$DDE_DATA_HOME" ]; then | ||
| mkdir -p "$DDE_DATA_HOME" | ||
| fi | ||
|
|
||
| # Check if DATA_DIR exists | ||
| if [ -d "$DATA_DIR" ]; then | ||
| # Move contents of DATA_DIR to DDE_DATA_HOME | ||
| # Assuming DDE_DATA_HOME/data is the target directory | ||
| local targetDir="$DDE_DATA_HOME/data" | ||
| mkdir -p "$targetDir" | ||
| mv "$DATA_DIR/*" "$targetDir/" | ||
| fi | ||
|
|
||
| # Create config.yml if it doesn't exist | ||
| local configFile="$DDE_DATA_HOME/config.yml" | ||
| if [ ! -f "$configFile" ]; then | ||
| touch "$configFile" | ||
| fi | ||
|
|
||
| # Create dde.conf in the nginx conf.d directory if it doesn't exist | ||
| local nginxConfFile="$DDE_DATA_HOME/data/reverseproxy/etc/nginx/conf.d/dde.conf" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not needed, if we treat the data directory in this repo as "defaults" |
||
| if [ ! -f "$nginxConfFile" ]; then | ||
| mkdir -p "$(dirname "$nginxConfFile")" | ||
| echo "client_max_body_size 100m;" > "$nginxConfFile" | ||
| fi | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| ## makes the setup for your shell | ||
|
|
||
| function system:dde:install() { | ||
| _createDataHome | ||
| system:dde:install:alias | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,15 +9,17 @@ function system:env() { | |
| echo OSTYPE=${OSTYPE} | ||
| echo SOURCE=${SOURCE} | ||
| echo ROOT_DIR=${ROOT_DIR} | ||
| echo DATA_DIR=${DATA_DIR} | ||
| echo CERT_DIR=${CERT_DIR} | ||
| _logYellow "DATA_DIR (Deprecated, use DDE_DATA_HOME) = ${DATA_DIR}" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sbaerlocher since its not a user-setting, we can fully remove data_dir from the code and just copy the ./data directory as boilerplate to the new path. This would also allow us to ship some default configuration |
||
| _logYellow "CERT_DIR (Deprecated, use DDE_CERT_PATH) = ${CERT_DIR}" | ||
| echo DDE_DATA_HOME=${DDE_DATA_HOME} | ||
| echo DDE_CERT_PATH=${DDE_CERT_PATH} | ||
| echo HELPER_DIR=${HELPER_DIR} | ||
| echo NETWORK_NAME=${NETWORK_NAME} | ||
| echo DOCKER_BUILDKIT=${DOCKER_BUILDKIT} | ||
| echo DDE_UID=${DDE_UID} | ||
| echo DDE_GID=${DDE_GID} | ||
| echo "" | ||
| _logGreen "Avialable services"; | ||
| _logGreen "Available services" | ||
| system:services | ||
| } | ||
|
|
||
|
|
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where / why is this file needed? i dont see it referenced anywhere