Prepare for deployment of v0.1

This commit is contained in:
Joseph Milazzo 2021-01-20 09:38:28 -06:00
parent ac993a59ba
commit 925a009f00
4 changed files with 59 additions and 2 deletions

34
.gitignore vendored
View File

@ -449,3 +449,37 @@ appsettings.json
/API/Hangfire.db
/API/Hangfire-log.db
cache/
/API/wwwroot/assets/images/image-placeholder.jpg
/API/wwwroot/assets/images/mock-cover.jpg
/API/wwwroot/assets/images/preset-light.png
/API/wwwroot/assets/themes/plex/_bootswatch.scss
/API/wwwroot/assets/themes/plex/_variables.scss
/API/wwwroot/admin-admin-module.js
/API/wwwroot/admin-admin-module.js.map
/API/wwwroot/fa-brands-400.eot
/API/wwwroot/fa-brands-400.svg
/API/wwwroot/fa-brands-400.ttf
/API/wwwroot/fa-brands-400.woff
/API/wwwroot/fa-brands-400.woff2
/API/wwwroot/fa-regular-400.eot
/API/wwwroot/fa-regular-400.svg
/API/wwwroot/fa-regular-400.ttf
/API/wwwroot/fa-regular-400.woff
/API/wwwroot/fa-regular-400.woff2
/API/wwwroot/fa-solid-900.eot
/API/wwwroot/fa-solid-900.svg
/API/wwwroot/fa-solid-900.ttf
/API/wwwroot/fa-solid-900.woff
/API/wwwroot/fa-solid-900.woff2
/API/wwwroot/favicon.ico
/API/wwwroot/index.html
/API/wwwroot/main.js
/API/wwwroot/main.js.map
/API/wwwroot/polyfills.js
/API/wwwroot/polyfills.js.map
/API/wwwroot/runtime.js
/API/wwwroot/runtime.js.map
/API/wwwroot/styles.css
/API/wwwroot/styles.css.map
/API/wwwroot/vendor.js
/API/wwwroot/vendor.js.map

View File

@ -0,0 +1,14 @@
using System.IO;
using API.Services;
using Microsoft.AspNetCore.Mvc;
namespace API.Controllers
{
public class FallbackController : Controller
{
public ActionResult Index()
{
return PhysicalFile(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "index.html"), "text/HTML");
}
}
}

View File

@ -58,10 +58,14 @@ namespace API
app.UseAuthorization();
app.UseDefaultFiles();
app.UseStaticFiles();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapHangfireDashboard();
endpoints.MapFallbackToController("Index", "Fallback");
});
}
}

View File

@ -11,3 +11,8 @@ open source variant that is flexible and packs more punch, without sacrificing e
* Expose an OPDS API/Stream for external readers to use
* Allow downloading files directly from WebApp
* WebApp/Server is Translated via Weblate (free for Open Source)
## How to Deploy
* Build kavita-webui via ng build --prod. The dest should be placed in the API/wwwroot directory
* Run publish command