feat: add AWS media resource management
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { Container, getContainer } from '@cloudflare/containers'
|
||||
import { env } from 'cloudflare:workers'
|
||||
|
||||
export class EversoloWebContainer extends Container {
|
||||
defaultPort = 3000
|
||||
requiredPorts = [3000]
|
||||
sleepAfter = '30m'
|
||||
envVars = {
|
||||
NODE_ENV: 'production',
|
||||
PORT: '3000',
|
||||
NEXT_PUBLIC_SITE_URL: env.NEXT_PUBLIC_SITE_URL,
|
||||
DATABASE_URI: env.DATABASE_URI,
|
||||
PAYLOAD_SECRET: env.PAYLOAD_SECRET,
|
||||
PAYLOAD_DB_PUSH: 'false',
|
||||
PAYLOAD_RUN_MIGRATIONS_ON_START: 'false',
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
async fetch(request, env) {
|
||||
const container = getContainer(env.EVERSOLO_WEB, 'primary')
|
||||
return container.fetch(request)
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user