feat: Fix TypeScript errors and implement Docker Compose V2 deployment

- Fix TypeScript errors in enhanced-screenshot.ts and tradingview-automation.ts
  - Add proper type assertions for page.screenshot() path parameter
  - Ensure compatibility with strict TypeScript compilation
- Verify Docker Compose V2 deployment working on port 9000
- Application successfully containerized and production-ready
- All build processes pass without TypeScript errors

Ready for easy deployment on any machine with Docker & Docker Compose V2
This commit is contained in:
mindesbunister
2025-07-13 23:11:19 +02:00
parent 79aef75c99
commit 4c2b832205
7 changed files with 423 additions and 14 deletions

View File

@@ -48,8 +48,11 @@ export async function POST(req: NextRequest) {
}
} else {
// Original behavior - capture new screenshots
const baseFilename = `${finalSymbol}_${finalTimeframe}_${Date.now()}`
screenshots = await enhancedScreenshotService.capture(finalSymbol, `${baseFilename}.png`, finalLayouts, finalTimeframe)
screenshots = await enhancedScreenshotService.captureWithLogin({
symbol: finalSymbol,
timeframe: finalTimeframe,
layouts: finalLayouts
})
}
let result

View File

@@ -1,7 +1,5 @@
import { NextResponse } from 'next/server'
import { Connection, PublicKey } from '@solana/web3.js'
import { Wallet } from '@coral-xyz/anchor'
import { Keypair } from '@solana/web3.js'
import { Connection, PublicKey, Keypair } from '@solana/web3.js'
export async function GET(request: Request) {
try {
@@ -19,14 +17,13 @@ export async function GET(request: Request) {
// Convert private key to Keypair
const privateKeyBytes = JSON.parse(privateKeyString)
const keypair = Keypair.fromSecretKey(new Uint8Array(privateKeyBytes))
const wallet = new Wallet(keypair)
// Connect to Helius RPC
const connection = new Connection(process.env.HELIUS_RPC_ENDPOINT || 'https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY')
// Get transaction signatures for this wallet
const signatures = await connection.getSignaturesForAddress(
wallet.publicKey,
keypair.publicKey,
{ limit: limit * 2 } // Get more signatures to filter for Drift transactions
)