-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DreamFactory - Upgrade Debian and fix setup (#2832)
* VM - DreamFactory - Upgrade Debian * dreamfactory * fix: refactor setup
- Loading branch information
1 parent
6267a04
commit 58cb36b
Showing
16 changed files
with
303 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
|
||
declare -r REPO_OWNER="dreamfactorysoftware/df-admin-interface" | ||
declare -r REPO_URL="https://github.com/${REPO_OWNER}" | ||
declare -r DF_FOLDER=/opt/dreamfactory | ||
declare -r DESTINATION_FOLDER="${DF_FOLDER}/public" | ||
declare -r TEMP_FOLDER="/tmp/df-ui" | ||
declare -r RELEASE_FILENAME="release.zip" | ||
declare -r FOLDERS_TO_REMOVE="dreamfactory filemanager df-api-docs-ui assets" | ||
|
||
REPO_OWNER="dreamfactorysoftware/df-admin-interface" | ||
REPO_URL="https://github.com/${REPO_OWNER}" | ||
DF_FOLDER=/opt/dreamfactory | ||
DESTINATION_FOLDER="${DF_FOLDER}/public" | ||
TEMP_FOLDER="/tmp/df-ui" | ||
RELEASE_FILENAME="release.zip" | ||
FOLDERS_TO_REMOVE="dreamfactory filemanager df-api-docs-ui assets" | ||
|
||
echo >&2 "Creating temporary directories..." | ||
mkdir -p "${TEMP_FOLDER}" "${DESTINATION_FOLDER}" | ||
|
||
echo >&2 "Setting up front-end..." | ||
cd "${TEMP_FOLDER}" | ||
|
||
# Getting the latest release | ||
latest_release="$(curl -s \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
"https://api.github.com/repos/${REPO_OWNER}/releases" \ | ||
| jq -r '.[0].tag_name')" | ||
echo >&2 "- Latest release: ${latest_release}" | ||
|
||
# Download the release | ||
release_url="${REPO_URL}/releases/download/${latest_release}/release.zip" | ||
curl -LO "${release_url}" | ||
|
||
# Clean up destination folder | ||
find "$DESTINATION_FOLDER" -type f \( -name "*.js" -o -name "*.css" \) -exec rm {} \; | ||
for folder in ${FOLDERS_TO_REMOVE}; do | ||
if [ -d "${DESTINATION_FOLDER}/${folder}" ]; then rm -rf "${DESTINATION_FOLDER}/${folder}"; fi; | ||
done | ||
|
||
# Extract the release | ||
unzip -qo "${RELEASE_FILENAME}" -d "${TEMP_FOLDER}" | ||
mv dist/index.html "${DF_FOLDER}/resources/views/index.blade.php" | ||
mv dist/* "${DESTINATION_FOLDER}" | ||
cd .. && rm -rf "${TEMP_FOLDER}" | ||
|
||
echo >&2 "Finished." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2024 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
package 'php8.1-fpm' do | ||
action :install | ||
retries 5 | ||
retry_delay 20 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2024 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
package 'php8.1-http' do | ||
action :install | ||
retries 5 | ||
retry_delay 20 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2024 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
package 'php8.1-interbase' do | ||
action :install | ||
retries 5 | ||
retry_delay 20 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2024 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
package 'php8.1-odbc' do | ||
action :install | ||
retries 5 | ||
retry_delay 20 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2024 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
package 'php8.1-pdo' do | ||
action :install | ||
retries 5 | ||
retry_delay 20 | ||
end |
Oops, something went wrong.