diff --git a/.changesets/11383.md b/.changesets/11383.md new file mode 100644 index 000000000000..c8c68a1c0766 --- /dev/null +++ b/.changesets/11383.md @@ -0,0 +1,3 @@ +- few Flightcontrol template & doc updates (#11383) by @flybayer + +Updates the flight control deployment command and documentation. Corrects issue #10754 which is to do with an outdated database setup. diff --git a/docs/docs/deploy/flightcontrol.md b/docs/docs/deploy/flightcontrol.md index 9d1c544703a3..a55c382a4a6e 100644 --- a/docs/docs/deploy/flightcontrol.md +++ b/docs/docs/deploy/flightcontrol.md @@ -9,15 +9,13 @@ description: How to deploy a Redwood app to AWS via Flightcontrol ## Flightcontrol Deploy Setup 1. In your project, run the command `yarn rw setup deploy flightcontrol --database=YOUR_DB_TYPE` where YOUR_DB_TYPE is `mysql` or `postgresql` -2. NOTE: The RedwoodJS Flightcontrol setup defaults to an environment\[0] of 'Development', add to the array to deploy more environments. -3. Commit the changes and push to github. -4. If you don't have an account, sign up at [app.flightcontrol.dev/signup](https://app.flightcontrol.dev/signup?ref=redwood). -5. Create a new project from the onboarding screen or project list. - 1. Connect your Github account and select your repo. - 2. Click "Create Project" and complete any required steps like linking your AWS account. - 3. Configuration Type should autoselect as `flightcontrol.json`. - 4. NOTE: `flightcontrol.json` is now the source of truth for your Project and its Environments. -6. Add your env vars in Flightcontrol for your Environment. -7. If using dbAuth, add the session secret key env variable in the Flightcontrol dashboard. +2. Commit the changes and push to github. +3. If you don't have an account, sign up at [app.flightcontrol.dev/signup](https://app.flightcontrol.dev/signup?ref=redwood). +4. Create a new project. + 1. Connect your GitHub account and select your repo. + 2. Click the Redwood preset + 3. Click "Create project" (do not add services to the UI during this step, the flightcontrol.json you added will be used for service config) +5. After project is created, add your env vars under Environment Settings. + 1. If using dbAuth, add the session secret key env variable in the Flightcontrol dashboard. -If you have _any_ problems or questions, Flightcontrol is very responsive in [their support Discord](https://discord.gg/yY8rSPrD6q). +If you have _any_ problems or questions, Flightcontrol is very responsive. [See their support options](https://www.flightcontrol.dev/docs/troubleshooting/contacting-support). diff --git a/packages/cli/src/commands/setup/deploy/templates/flightcontrol.js b/packages/cli/src/commands/setup/deploy/templates/flightcontrol.js index 9de6a55cbd0f..d6e28c42b8d1 100644 --- a/packages/cli/src/commands/setup/deploy/templates/flightcontrol.js +++ b/packages/cli/src/commands/setup/deploy/templates/flightcontrol.js @@ -12,15 +12,17 @@ export const flightcontrolConfig = { { id: 'redwood-api', name: 'Redwood API', - type: 'fargate', + type: 'web', buildType: 'nixpacks', cpu: 0.5, memory: 1, - installCommand: 'corepack enable && yarn install', buildCommand: 'yarn rw deploy flightcontrol api', startCommand: 'yarn rw deploy flightcontrol api --serve', port: 8911, healthCheckPath: '/graphql/health', + ci: { + type: 'ec2', + }, envVariables: { REDWOOD_WEB_URL: { fromService: { id: 'redwood-web', value: 'origin' }, @@ -33,9 +35,11 @@ export const flightcontrolConfig = { type: 'static', buildType: 'nixpacks', singlePageApp: true, - installCommand: 'corepack enable && yarn install', buildCommand: 'yarn rw deploy flightcontrol web', outputDirectory: 'web/dist', + ci: { + type: 'ec2', + }, envVariables: { REDWOOD_API_URL: { fromService: { id: 'redwood-api', value: 'origin' }, @@ -52,8 +56,8 @@ export const postgresDatabaseService = { name: 'Database', type: 'rds', engine: 'postgres', - engineVersion: '12', - instanceSize: 'db.t2.micro', + engineVersion: '16', + instanceSize: 'db.t4g.micro', port: 5432, storage: 20, private: false, @@ -65,7 +69,7 @@ export const mysqlDatabaseService = { type: 'rds', engine: 'mysql', engineVersion: '8', - instanceSize: 'db.t2.micro', + instanceSize: 'db.t4g.micro', port: 3306, storage: 20, private: false,