Compare commits
No commits in common. "65e5bf16b55e891eb61e6f68766de5bb78f2ea9d" and "226caf4c1e0183d5781ae5f073a51cf0755fc2b0" have entirely different histories.
65e5bf16b5
...
226caf4c1e
8 changed files with 4 additions and 53 deletions
28
Dockerfile
28
Dockerfile
|
|
@ -1,28 +0,0 @@
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS dotnet_build
|
|
||||||
WORKDIR /App
|
|
||||||
|
|
||||||
COPY ./backend/src ./
|
|
||||||
|
|
||||||
RUN dotnet restore
|
|
||||||
|
|
||||||
RUN dotnet publish -c Release -o out
|
|
||||||
|
|
||||||
FROM node:25.6.1-bookworm AS react_build
|
|
||||||
WORKDIR /App
|
|
||||||
|
|
||||||
COPY ./frontend ./
|
|
||||||
|
|
||||||
RUN npm ci
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0
|
|
||||||
WORKDIR /App
|
|
||||||
EXPOSE 5000
|
|
||||||
EXPOSE 5001
|
|
||||||
|
|
||||||
COPY --from=dotnet_build /App/out .
|
|
||||||
COPY --from=react_build /App/dist ./wwwroot
|
|
||||||
|
|
||||||
ENV ASPNETCORE_URLS=http://+:5000
|
|
||||||
|
|
||||||
ENTRYPOINT ["dotnet", "JellyGlass-Backend.dll"]
|
|
||||||
2
backend/src/.gitignore
vendored
2
backend/src/.gitignore
vendored
|
|
@ -5,8 +5,6 @@
|
||||||
|
|
||||||
# database files
|
# database files
|
||||||
JellyGlass-test.db
|
JellyGlass-test.db
|
||||||
JellyGlass-test.db-shm
|
|
||||||
JellyGlass-test.db-wal
|
|
||||||
|
|
||||||
# dotenv files
|
# dotenv files
|
||||||
.env
|
.env
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc;
|
||||||
namespace JellyGlass.Controllers;
|
namespace JellyGlass.Controllers;
|
||||||
|
|
||||||
[ApiController]
|
[ApiController]
|
||||||
[Route("api/[controller]")]
|
[Route("[controller]")]
|
||||||
public class SearchController : ControllerBase
|
public class SearchController : ControllerBase
|
||||||
{
|
{
|
||||||
private ILogger<SearchController> _logger;
|
private ILogger<SearchController> _logger;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc;
|
||||||
namespace JellyGlass.Controllers;
|
namespace JellyGlass.Controllers;
|
||||||
|
|
||||||
[ApiController]
|
[ApiController]
|
||||||
[Route("api/[controller]")]
|
[Route("[controller]")]
|
||||||
public class ServersController : ControllerBase
|
public class ServersController : ControllerBase
|
||||||
{
|
{
|
||||||
private ILogger<ServersController> _logger;
|
private ILogger<ServersController> _logger;
|
||||||
|
|
|
||||||
BIN
backend/src/JellyGlass-test.db-shm
Normal file
BIN
backend/src/JellyGlass-test.db-shm
Normal file
Binary file not shown.
0
backend/src/JellyGlass-test.db-wal
Normal file
0
backend/src/JellyGlass-test.db-wal
Normal file
|
|
@ -1,6 +1,5 @@
|
||||||
using JellyGlass.Repositories;
|
using JellyGlass.Repositories;
|
||||||
using JellyGlass.Services;
|
using JellyGlass.Services;
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
|
|
@ -19,7 +18,7 @@ if (builder.Environment.IsDevelopment())
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dbConnectionString = "Data Source=JellyGlass.db;";
|
dbConnectionString = "Data Source./JellyGlass.db;";
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.Services.AddSqlite<DatabaseContext>(dbConnectionString);
|
builder.Services.AddSqlite<DatabaseContext>(dbConnectionString);
|
||||||
|
|
@ -32,22 +31,6 @@ builder.Services.AddTransient<ISearchService, SearchService>();
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
using (var scope = app.Services.CreateScope())
|
|
||||||
{
|
|
||||||
var dbContext = scope.ServiceProvider.GetRequiredService<DatabaseContext>();
|
|
||||||
dbContext.Database.Migrate();
|
|
||||||
|
|
||||||
dbContext.Servers.Add(new JellyGlass.Models.Server()
|
|
||||||
{
|
|
||||||
ApiToken = "56b6f91b816540b59d03a0db53c2dc8e",
|
|
||||||
Id = "1",
|
|
||||||
Owner = "Riley",
|
|
||||||
Url = "https://jellyfin.foxhawk.co.uk"
|
|
||||||
});
|
|
||||||
|
|
||||||
dbContext.SaveChanges();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Configure the HTTP request pipeline.
|
// Configure the HTTP request pipeline.
|
||||||
if (app.Environment.IsDevelopment())
|
if (app.Environment.IsDevelopment())
|
||||||
{
|
{
|
||||||
|
|
@ -56,7 +39,5 @@ if (app.Environment.IsDevelopment())
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
app.UseDefaultFiles();
|
|
||||||
app.UseStaticFiles();
|
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
|
|
||||||
export const apiUrl = "http://localhost:5000/api"
|
export const apiUrl = "http://localhost:5092"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue