Emit a ShinyProxy app-spec block for an aurora image
Source:R/shinyproxy.R
aurora_shinyproxy_yaml.RdGenerates the YAML spec entry that goes under proxy.specs in a ShinyProxy
configuration, pointing at a built aurora image (see aurora_build_image()).
aurora apps are ordinary Docker-backed apps from ShinyProxy's point of view:
the spec just needs the image and the port the app listens on.
Usage
aurora_shinyproxy_yaml(
image,
dir = ".",
id = NULL,
display_name = NULL,
description = NULL,
port = 8000L,
env = NULL,
wrap = FALSE,
write = FALSE,
file = NULL
)Arguments
- image
Container image tag, e.g.
"org/meu_app:latest"(required).- dir
App directory, used only to default
id/display_namefrom the app name.- id
Spec id. Defaults to the app name.
- display_name
Human-facing name. Defaults to the app name.
- description
Optional one-line description.
- port
Port the app listens on inside the container (the aurora default is
8000).- env
Optional named list/vector of
container-envvariables, e.g.list(AURORA_ENV = "prod").- wrap
If
TRUE, wrap the entry underproxy: specs:so the output is a complete, paste-ready snippet. IfFALSE(default), emit just the- id: ...list item to add under your existingproxy.specs.- write
If
TRUE, also write the YAML tofile.- file
Output path. Required when
write = TRUE(there is no default path – pass an explicit location, e.g. one undertempdir());NULLotherwise.
Examples
cat(aurora_shinyproxy_yaml(image = "org/meu_app:latest", id = "meu_app"))
#> ℹ ShinyProxy spec for "meu_app" (image "org/meu_app:latest", port 8000)
#> - id: meu_app
#> display-name: meu_app
#> container-image: org/meu_app:latest
#> port: 8000