Closed csearcy31 closed 4 years ago
Do you have reprex code we could look at?
I'm having trouble creating a real reprex because of the authentication required, but this is the (unevaluated) code. The plumber.R file I'm attempting to deploy is extremely minimal. It's basically just supposed to print the date.
plumber.R:
#* @get /
function() {
Sys.Date()
}
REPREX:
## load packages
library(analogsea)
library(plumber)
library(plumberDeploy)
library(ssh)
## create and provision droplet
mydrop <- do_provision(unstable = TRUE, example = FALSE)
## deploy to DigitalOcean
plumberDeploy::do_deploy_api(
droplet = mydrop,
path = "test",
localPath = "./api", # location of plumber.R file
port = 8000
)
Created on 2020-09-09 by the reprex package (v0.3.0)
I'll take a look tonight after work
That's great. Thank you so much!
So you got a Error: attempt to apply non-function
because function name pr$setUI
in plumber.service was not updated to match new name pr$setDocs
. They have been updated.
That worked perfectly! Thank you so much @meztez !
Hello. I know this is a very new package, so I wouldn't expect it to be perfect by any means at this point. However, I wanted to point out an issue I'm having when attempting to deploy my API to DigitalOcean. I have tried this on multiple machines and with many different configurations and continue to get the same error. I am using dev versions of plumber, plumberDeploy, and analogsea.
I am able to successfully create and provision droplets using
plumberDeploy::do_provision(unstable = TRUE)
. It may also be worth noting that the example "hello" API deployed bydo_provision()
also fails with the same error.The error I'm getting is this:
Rscript[75862]: Error: attempt to apply non-function
Trace looks like this:
My original thinking was that
droplet_ssh()
ordo_ssh()
might have been the problem, but they're both called earlier in the deployment and seem to work fine. It looks like, for some reason,systemctl status plumber-test
is not working.Thanks so much for your help!