mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
## Description <!-- Briefly describe the purpose and scope of your changes --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Upgraded API and authentication services with dynamic scaling, enhanced load balancing, and real-time interaction endpoints. - Introduced new commands to streamline local development and container builds. - Added new endpoints for retrieving Steam account information and managing connections. - Implemented a QR code authentication interface for Steam, enhancing user login experiences. - **Database Updates** - Rolled out comprehensive schema migrations that improve data integrity and indexing. - Introduced new tables for managing Steam user credentials and machine information. - **UI Enhancements** - Added refreshed animated assets and an improved QR code login flow for a more engaging experience. - Introduced new styled components for displaying friends and games. - **Maintenance** - Completed extensive refactoring and configuration updates to optimize performance and development workflows. - Updated logging configurations and improved error handling mechanisms. - Streamlined resource definitions in the configuration files. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
69 lines
1.4 KiB
TypeScript
69 lines
1.4 KiB
TypeScript
import { vpc } from "./vpc";
|
|
import { isPermanentStage } from "./stage";
|
|
|
|
// TODO: Add a dev db to use, this will help with running zero locally... and testing it
|
|
export const postgres = new sst.aws.Aurora("Database", {
|
|
vpc,
|
|
engine: "postgres",
|
|
scaling: isPermanentStage
|
|
? undefined
|
|
: {
|
|
min: "0 ACU",
|
|
max: "1 ACU",
|
|
},
|
|
transform: {
|
|
clusterParameterGroup: {
|
|
parameters: [
|
|
{
|
|
name: "rds.logical_replication",
|
|
value: "1",
|
|
applyMethod: "pending-reboot",
|
|
},
|
|
{
|
|
name: "max_slot_wal_keep_size",
|
|
value: "10240",
|
|
applyMethod: "pending-reboot",
|
|
},
|
|
{
|
|
name: "rds.force_ssl",
|
|
value: "0",
|
|
applyMethod: "pending-reboot",
|
|
},
|
|
{
|
|
name: "max_connections",
|
|
value: "1000",
|
|
applyMethod: "pending-reboot",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
});
|
|
|
|
|
|
new sst.x.DevCommand("Studio", {
|
|
link: [postgres],
|
|
dev: {
|
|
command: "bun db:dev studio",
|
|
directory: "packages/core",
|
|
autostart: true,
|
|
},
|
|
});
|
|
|
|
const migrator = new sst.aws.Function("DatabaseMigrator", {
|
|
handler: "packages/functions/src/migrator.handler",
|
|
link: [postgres],
|
|
copyFiles: [
|
|
{
|
|
from: "packages/core/migrations",
|
|
to: "./migrations",
|
|
},
|
|
],
|
|
});
|
|
|
|
if (!$dev) {
|
|
new aws.lambda.Invocation("DatabaseMigratorInvocation", {
|
|
input: Date.now().toString(),
|
|
functionName: migrator.name,
|
|
});
|
|
}
|