Skip to content

Commit

Permalink
fix port arg
Browse files Browse the repository at this point in the history
  • Loading branch information
maxheld83 committed Nov 24, 2020
1 parent d384cc1 commit a3e94d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG MUGGLE_TAG=f7fb6146d8712c4bffb024f4d4f40c40ffab5598
FROM subugoe/muggle-buildtime-onbuild:${MUGGLE_TAG} as buildtime
FROM subugoe/muggle-runtime-onbuild:${MUGGLE_TAG} as runtime
CMD shinycaas::az_webapp_shiny_opts(); shinycaas::runOldFaithful()
CMD shinycaas::shiny_opts_az(); shinycaas::runOldFaithful()
12 changes: 5 additions & 7 deletions R/azure.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,17 @@ AzureAppService::az_configure
#' If your image suggests `EXPOSE`d ports, that may be respected by Azure (undocumented behavior).
#' - `options(shiny.host = "0.0.0.0")` to make your shiny application accessable to the Azure Webapp hosting environment.
#'
#' You can also set these options manually, see [az_webapp()].
#'
#' @family azure functions
#'
#' @export
shiny_opts_az <- function() {
port <- Sys.getenv("PORT")
if (port == "") {
cli::cli_alert_warning(
"Could not find environment variable {cli::cli_code('PORT')}.",
"Perhaps this is running outside of Azure?",
"Reverting to shiny default."
)
cli::cli_alert_warning(c(
"Could not find environment variable {.envvar PORT}. ",
"Perhaps this is running outside of Azure? ",
"Reverting to shiny default. "
))
port <- NULL
} else {
port <- as.integer(port)
Expand Down
3 changes: 0 additions & 3 deletions man/shiny_opts_az.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a3e94d6

Please sign in to comment.