-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Updates from experience deploying with FlightControl #11656
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -9,13 +9,92 @@ 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. 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. | ||||||||||
2. NOTE: The RedwoodJS Flightcontrol sets up an array of environments and defaults you to the 1st one: '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. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
1. Connect your Github account and select your repo. | ||||||||||
2. Click "Create Project" and complete any required steps like linking your AWS account. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
3. Configuration Type should autoselect as `flightcontrol.json`. | ||||||||||
4. NOTE: `flightcontrol.json` is now the source of truth for your Project and its Environments. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
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. | ||||||||||
Comment on lines
+20
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
8. To tear down your project w/Flight control go to your dashboard and the 'Danger Zone' and choose delete. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
||||||||||
If you have _any_ problems or questions, Flightcontrol is very responsive. [See their support options](https://www.flightcontrol.dev/docs/troubleshooting/contacting-support). | ||||||||||
If you have *any* problems or questions, Flightcontrol is very responsive in [their support Discord](https://discord.gg/yY8rSPrD6q). | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
||||||||||
This was a working `flightcontrol.json` configuration | ||||||||||
|
||||||||||
``` | ||||||||||
{ | ||||||||||
"$schema": "https://app.flightcontrol.dev/schema.json", | ||||||||||
"environments": [ | ||||||||||
{ | ||||||||||
"id": "staging", | ||||||||||
"name": "Staging", | ||||||||||
"region": "us-east-1", | ||||||||||
"source": { | ||||||||||
"branch": "staging" | ||||||||||
}, | ||||||||||
"services": [ | ||||||||||
{ | ||||||||||
"id": "redwood-api", | ||||||||||
"name": "Redwood API", | ||||||||||
"type": "fargate", | ||||||||||
"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", | ||||||||||
"envVariables": { | ||||||||||
"REDWOOD_WEB_URL": { | ||||||||||
"fromService": { | ||||||||||
"id": "redwood-web", | ||||||||||
"value": "origin" | ||||||||||
} | ||||||||||
}, | ||||||||||
"DATABASE_URL": { | ||||||||||
"fromService": { | ||||||||||
"id": "db", | ||||||||||
"value": "dbConnectionString" | ||||||||||
} | ||||||||||
} | ||||||||||
} | ||||||||||
}, | ||||||||||
{ | ||||||||||
"id": "redwood-web", | ||||||||||
"name": "Redwood Web", | ||||||||||
"type": "static", | ||||||||||
"buildType": "nixpacks", | ||||||||||
"singlePageApp": true, | ||||||||||
"installCommand": "corepack enable && yarn install", | ||||||||||
"buildCommand": "yarn rw deploy flightcontrol web", | ||||||||||
"outputDirectory": "web/dist", | ||||||||||
"envVariables": { | ||||||||||
"REDWOOD_API_URL": { | ||||||||||
"fromService": { | ||||||||||
"id": "redwood-api", | ||||||||||
"value": "origin" | ||||||||||
} | ||||||||||
} | ||||||||||
} | ||||||||||
}, | ||||||||||
{ | ||||||||||
"id": "db", | ||||||||||
"name": "Database", | ||||||||||
"type": "rds", | ||||||||||
"engine": "postgres", | ||||||||||
"engineVersion": "12", | ||||||||||
"instanceSize": "db.t4g.micro", | ||||||||||
"port": 5432, | ||||||||||
"storage": 20, | ||||||||||
"private": false | ||||||||||
} | ||||||||||
] | ||||||||||
} | ||||||||||
] | ||||||||||
} | ||||||||||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.