astonishing-laptop-19143
05/25/2023, 6:30 PMshuttle_static_folder::StaticFolder
I receive some errors.
Here is my main function along with the error I'm receiving. It works when I run it using cargo shuttle run but doesn't seem to be able to deploy.
#[shuttle_runtime::main]
async fn start(
#[shuttle_secrets::Secrets] secret_store: SecretStore,
#[shuttle_static_folder::StaticFolder(folder = "static")] _static_folder: PathBuf
) -> Result<CustomService, shuttle_service::Error> {
let discord_bot = bot::build_bot(secret_store).await?;
let built_rocket = rocket::build();
Ok(CustomService {
discord_bot,
built_rocket,
})
}
https://cdn.discordapp.com/attachments/1111360713752059905/1111360713882079273/image.png▾
https://cdn.discordapp.com/attachments/1111360713752059905/1111360714217635970/image.png▾
agreeable-painting-48846
05/25/2023, 8:50 PMindex.html
in your static folder? just want to see if anything changesastonishing-laptop-19143
05/25/2023, 9:54 PMhttps://cdn.discordapp.com/attachments/1111360713752059905/1111411938384167013/image.png▾
https://cdn.discordapp.com/attachments/1111360713752059905/1111411938698735706/image.png▾
enough-oil-62271
05/25/2023, 9:56 PMastonishing-laptop-19143
05/25/2023, 9:59 PM!static/
in my gitignore. Should I be doing static/SSLCert.pem
?agreeable-painting-48846
05/25/2023, 10:00 PM!static/
in itastonishing-laptop-19143
05/25/2023, 10:13 PMhttps://cdn.discordapp.com/attachments/1111360713752059905/1111416808784793641/image.png▾
https://cdn.discordapp.com/attachments/1111360713752059905/1111416809078403233/image.png▾
agreeable-painting-48846
05/25/2023, 10:14 PMastonishing-laptop-19143
05/25/2023, 10:20 PMhttps://cdn.discordapp.com/attachments/1111360713752059905/1111418578403602542/image.png▾
agreeable-painting-48846
05/25/2023, 10:21 PMastonishing-laptop-19143
05/25/2023, 10:21 PMasync fn retrieve_tls_connector() -> Result<MakeTlsConnector, openssl::error::ErrorStack> {
info!("retrieve tls connector");
let mut builder: openssl::ssl::SslConnectorBuilder = match SslConnector::builder(SslMethod::tls()) {
Ok(builder) => builder,
Err(error) => panic!("Error building SSL Connector: {}", error),
};
info!("set ssl certificate");
match builder.set_ca_file("static/SSLCERT.pem") {
Ok(_) => {
Ok(MakeTlsConnector::new(builder.build()))
},
Err(error) => panic!("Error setting CA file: {}", error),
}
}
agreeable-painting-48846
05/25/2023, 10:25 PM/SSLCERT.pem
to it then sending it back to .set_ca_file
(you might need to convert it back to a &str or whatever, not entirely sure but yeah)astonishing-laptop-19143
05/25/2023, 10:40 PMagreeable-painting-48846
05/25/2023, 10:45 PM