2
0

Use a local SQLite3 backend instead of PostgreSQL Docker container.

* The provided SQLite3 database contains the required schemas, but no data and can be reset to if required.
* Remove all references to PostgreSQL in documentation and configuration.
* Replace native sqlite3 command with a console app to remove dependency on SQLite3 installation.
This commit is contained in:
2025-11-03 15:09:09 +01:00
parent b61e6a6cc7
commit f1c0021ad3
14 changed files with 124 additions and 139 deletions

View File

@@ -21,10 +21,9 @@ services.AddEndpointsApiExplorer();
services.AddSwaggerGen();
services.AddDbContext<AppDbContext>(optionsBuilder =>
{
// Configure the database connection string.
var connectionString = builder.Configuration.GetValue<string>("PostgresConnection");
Console.WriteLine($"Connecting to PostgreSQL database with connection string: {connectionString}");
optionsBuilder.UseNpgsql(connectionString);
var connectionString = builder.Configuration.GetValue<string>("SqliteConnection");
Console.WriteLine($"Setting up SQLite database with {connectionString}");
optionsBuilder.UseSqlite(connectionString);
});
var httpClientBuilder = services.AddHttpClient<JsonPlaceholderClient>();