Skip to content

Commit 925a009

Browse files
committed
Prepare for deployment of v0.1
1 parent ac993a5 commit 925a009

File tree

4 files changed

+59
-2
lines changed

4 files changed

+59
-2
lines changed

.gitignore

+35-1
Original file line numberDiff line numberDiff line change
@@ -448,4 +448,38 @@ appsettings.json
448448
/API/kavita.db-wal
449449
/API/Hangfire.db
450450
/API/Hangfire-log.db
451-
cache/
451+
cache/
452+
/API/wwwroot/assets/images/image-placeholder.jpg
453+
/API/wwwroot/assets/images/mock-cover.jpg
454+
/API/wwwroot/assets/images/preset-light.png
455+
/API/wwwroot/assets/themes/plex/_bootswatch.scss
456+
/API/wwwroot/assets/themes/plex/_variables.scss
457+
/API/wwwroot/admin-admin-module.js
458+
/API/wwwroot/admin-admin-module.js.map
459+
/API/wwwroot/fa-brands-400.eot
460+
/API/wwwroot/fa-brands-400.svg
461+
/API/wwwroot/fa-brands-400.ttf
462+
/API/wwwroot/fa-brands-400.woff
463+
/API/wwwroot/fa-brands-400.woff2
464+
/API/wwwroot/fa-regular-400.eot
465+
/API/wwwroot/fa-regular-400.svg
466+
/API/wwwroot/fa-regular-400.ttf
467+
/API/wwwroot/fa-regular-400.woff
468+
/API/wwwroot/fa-regular-400.woff2
469+
/API/wwwroot/fa-solid-900.eot
470+
/API/wwwroot/fa-solid-900.svg
471+
/API/wwwroot/fa-solid-900.ttf
472+
/API/wwwroot/fa-solid-900.woff
473+
/API/wwwroot/fa-solid-900.woff2
474+
/API/wwwroot/favicon.ico
475+
/API/wwwroot/index.html
476+
/API/wwwroot/main.js
477+
/API/wwwroot/main.js.map
478+
/API/wwwroot/polyfills.js
479+
/API/wwwroot/polyfills.js.map
480+
/API/wwwroot/runtime.js
481+
/API/wwwroot/runtime.js.map
482+
/API/wwwroot/styles.css
483+
/API/wwwroot/styles.css.map
484+
/API/wwwroot/vendor.js
485+
/API/wwwroot/vendor.js.map

API/Controllers/FallbackController.cs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System.IO;
2+
using API.Services;
3+
using Microsoft.AspNetCore.Mvc;
4+
5+
namespace API.Controllers
6+
{
7+
public class FallbackController : Controller
8+
{
9+
public ActionResult Index()
10+
{
11+
return PhysicalFile(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "index.html"), "text/HTML");
12+
}
13+
}
14+
}

API/Startup.cs

+4
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,14 @@ public void Configure(IApplicationBuilder app, IBackgroundJobClient backgroundJo
5858

5959
app.UseAuthorization();
6060

61+
app.UseDefaultFiles();
62+
app.UseStaticFiles();
63+
6164
app.UseEndpoints(endpoints =>
6265
{
6366
endpoints.MapControllers();
6467
endpoints.MapHangfireDashboard();
68+
endpoints.MapFallbackToController("Index", "Fallback");
6569
});
6670
}
6771
}

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ open source variant that is flexible and packs more punch, without sacrificing e
1010
* Metadata should allow for collections, want to read integration from 3rd party services, genres.
1111
* Expose an OPDS API/Stream for external readers to use
1212
* Allow downloading files directly from WebApp
13-
* WebApp/Server is Translated via Weblate (free for Open Source)
13+
* WebApp/Server is Translated via Weblate (free for Open Source)
14+
15+
16+
## How to Deploy
17+
* Build kavita-webui via ng build --prod. The dest should be placed in the API/wwwroot directory
18+
* Run publish command

0 commit comments

Comments
 (0)