diff --git a/Dockerfile b/Dockerfile index 5f2751e..e69de29 100644 --- a/Dockerfile +++ b/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"] \ No newline at end of file diff --git a/backend/src/.gitignore b/backend/src/.gitignore index 18faf30..fa5d6d5 100644 --- a/backend/src/.gitignore +++ b/backend/src/.gitignore @@ -5,8 +5,6 @@ # database files JellyGlass-test.db -JellyGlass-test.db-shm -JellyGlass-test.db-wal # dotenv files .env diff --git a/backend/src/Controllers/SearchController.cs b/backend/src/Controllers/SearchController.cs index 201ded1..3e4ede0 100644 --- a/backend/src/Controllers/SearchController.cs +++ b/backend/src/Controllers/SearchController.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc; namespace JellyGlass.Controllers; [ApiController] -[Route("api/[controller]")] +[Route("[controller]")] public class SearchController : ControllerBase { private ILogger _logger; diff --git a/backend/src/Controllers/ServersController.cs b/backend/src/Controllers/ServersController.cs index 92e7ae3..a38be5d 100644 --- a/backend/src/Controllers/ServersController.cs +++ b/backend/src/Controllers/ServersController.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc; namespace JellyGlass.Controllers; [ApiController] -[Route("api/[controller]")] +[Route("[controller]")] public class ServersController : ControllerBase { private ILogger _logger; diff --git a/backend/src/JellyGlass-test.db-shm b/backend/src/JellyGlass-test.db-shm new file mode 100644 index 0000000..fe9ac28 Binary files /dev/null and b/backend/src/JellyGlass-test.db-shm differ diff --git a/backend/src/JellyGlass-test.db-wal b/backend/src/JellyGlass-test.db-wal new file mode 100644 index 0000000..e69de29 diff --git a/backend/src/Program.cs b/backend/src/Program.cs index 1b19d18..bc43a4e 100644 --- a/backend/src/Program.cs +++ b/backend/src/Program.cs @@ -1,6 +1,5 @@ using JellyGlass.Repositories; using JellyGlass.Services; -using Microsoft.EntityFrameworkCore; var builder = WebApplication.CreateBuilder(args); @@ -19,7 +18,7 @@ if (builder.Environment.IsDevelopment()) } else { - dbConnectionString = "Data Source=JellyGlass.db;"; + dbConnectionString = "Data Source./JellyGlass.db;"; } builder.Services.AddSqlite(dbConnectionString); @@ -32,22 +31,6 @@ builder.Services.AddTransient(); var app = builder.Build(); -using (var scope = app.Services.CreateScope()) -{ - var dbContext = scope.ServiceProvider.GetRequiredService(); - 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. if (app.Environment.IsDevelopment()) { @@ -56,7 +39,5 @@ if (app.Environment.IsDevelopment()) app.UseHttpsRedirection(); app.MapControllers(); -app.UseDefaultFiles(); -app.UseStaticFiles(); app.Run(); diff --git a/frontend/src/Lib/api.ts b/frontend/src/Lib/api.ts index 4fd6c38..bc0d3d2 100644 --- a/frontend/src/Lib/api.ts +++ b/frontend/src/Lib/api.ts @@ -1,2 +1,2 @@ -export const apiUrl = "http://localhost:5000/api" \ No newline at end of file +export const apiUrl = "http://localhost:5092" \ No newline at end of file