Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

few Flightcontrol template & doc updates #11383

Merged
merged 4 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changesets/11383.md
Original file line number Diff line number Diff line change
@@ -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.
20 changes: 9 additions & 11 deletions docs/docs/deploy/flightcontrol.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
16 changes: 10 additions & 6 deletions packages/cli/src/commands/setup/deploy/templates/flightcontrol.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand All @@ -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' },
Expand All @@ -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,
Expand All @@ -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,
Expand Down
Loading