-
-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: update Dockerfile to new config.json client configuration
* Fix some markup validation errors in index.html * Fix config.json fetching * Fix incorrect variable name for external config
- Loading branch information
Showing
7 changed files
with
50 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
|
||
## If the command has not been replaced by the user (i.e docker run image /bin/sh), | ||
## follow through the setup process | ||
if [[ "$*" = "nginx -g daemon off;" ]]; then | ||
echo "==== Starting Jellyfin Vue setup ====" | ||
echo | ||
/setup.sh | ||
echo | ||
echo "==== Setup finished! ====" | ||
echo -e "\n" | ||
fi | ||
|
||
exec "$@" |
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 |
---|---|---|
@@ -1,11 +1,9 @@ | ||
server { | ||
listen 80; | ||
|
||
root /usr/share/nginx/html; | ||
|
||
location / { | ||
# First attempt to serve request as file, then as directory, then fall back to redirecting to index.html | ||
# This is needed for history mode in Vue router | ||
# This is needed for history mode in Vue router: https://router.vuejs.org/guide/essentials/history-mode.html#nginx | ||
try_files $uri $uri/ /index.html; | ||
} | ||
} |
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,21 @@ | ||
#!/bin/sh | ||
|
||
CONFIG_FILE_PATH="/usr/share/nginx/html/config.json" | ||
echo "Writing data to $CONFIG_FILE_PATH..." | ||
|
||
if [[ "$HISTORY_ROUTER_MODE" == "0" ]]; then | ||
ROUTER_MODE="hash" | ||
else | ||
ROUTER_MODE="history" | ||
fi | ||
|
||
echo "DEFAULT_SERVERS value: $DEFAULT_SERVERS" | ||
echo "ROUTER_MODE value: $ROUTER_MODE" | ||
|
||
output=$(jq -r --arg R_MODE "$ROUTER_MODE" --arg SERVS "$DEFAULT_SERVERS" ' | ||
.defaultServerURLs = ($SERVS | split(",")) | | ||
.routerMode = $R_MODE | ||
' $CONFIG_FILE_PATH | ||
) | ||
|
||
echo "$output" > $CONFIG_FILE_PATH |
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