AWS Amplify Hosting deploy prep
- amplify.yml: build spec (preBuild npm ci with offline cache, build next build, artifacts at .next/**, cache node_modules/.next-cache/.npm). - .nvmrc: pin Node 20 so Amplify uses the same runtime as local. - AMPLIFY_DEPLOY.md: first-time walkthrough covering AWS-side setup (create app, connect GitHub via OAuth/App, branch/auto-detect), environment variable table with secret-flag guidance, smoke-test via /healthz and /api/health, optional custom domain + per-PR previews, cost estimate, and operational notes (cold starts, no static egress IPs, CloudWatch logs, secret rotation). - README deploy section: now points at both AMPLIFY_DEPLOY.md and the existing DEPLOYMENT.md (Render).
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
version: 1
|
||||
applications:
|
||||
- frontend:
|
||||
phases:
|
||||
preBuild:
|
||||
commands:
|
||||
- nvm use $(cat .nvmrc) || nvm install $(cat .nvmrc)
|
||||
- npm ci --cache .npm --prefer-offline
|
||||
build:
|
||||
commands:
|
||||
- npm run build
|
||||
artifacts:
|
||||
baseDirectory: .next
|
||||
files:
|
||||
- '**/*'
|
||||
cache:
|
||||
paths:
|
||||
- node_modules/**/*
|
||||
- .next/cache/**/*
|
||||
- .npm/**/*
|
||||
Reference in New Issue
Block a user