You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
project: client-alpha # Groups related deployments
120
+
include_db: true
150
121
```
151
122
152
-
Projects help separate:
153
-
- Different clients or customers
154
-
- Development, staging, and production environments
155
-
- Team-based application ownership
156
-
157
-
### Packages
158
-
159
-
Install additional system packages your application requires:
160
-
161
-
```yaml
162
-
packages:
163
-
- procps # Process monitoring tools
164
-
- imagemagick # Image processing
165
-
- ffmpeg # Media processing
166
-
```
123
+
This is not persistent and will be lost on restart. It is recommended to use a database service instead.
167
124
168
-
## Multiple Configuration Examples
125
+
### Strategy
169
126
170
-
### Minimal Configuration
171
-
```yaml
172
-
# Uses all defaults - suitable for development
173
-
name: my-app-dev
174
-
```
127
+
Deployment strategy:
128
+
Available strategies:
129
+
- `immediate`: [Default] Deploy immediately
130
+
- `rolling`: Deploy in a rolling manner
131
+
- `bluegreen`: Deploy in a blue-green manner
132
+
- `canary`: Deploy in a canary manner, boot as single machine verify its health and then restart the rest.
175
133
176
-
### Production Configuration
177
134
```yaml
178
-
name: myapp-production
179
-
description: 'Main production deployment'
180
-
regions:
181
-
sjc: 2
182
-
lhr: 1
183
-
vmtype: c4m4
184
-
hostname: myapp.com
185
-
envfile: .env.production
186
-
project: myapp
187
-
packages:
188
-
- imagemagick
189
-
- redis-tools
135
+
strategy: immediate
190
136
```
191
137
192
-
### Multi-Environment Setup
138
+
## Multi-Environment Setup
193
139
194
140
**Development (`cloud-dev.yml`):**
195
141
```yaml
@@ -217,12 +163,10 @@ regions:
217
163
sjc: 2
218
164
lhr: 1
219
165
vmtype: c4m4
220
-
hostname: myapp.com
166
+
hostname: myapp
221
167
envfile: .env.production
222
168
```
223
169
224
-
## Using Different Configuration Files
225
-
226
170
Deploy with specific configuration files:
227
171
228
172
```bash
@@ -233,35 +177,3 @@ reflex deploy
233
177
reflex deploy --config cloud-prod.yml
234
178
reflex deploy --config cloud-staging.yml
235
179
```
236
-
237
-
## Deployment Workflow
238
-
239
-
1. **Generate base configuration:**
240
-
```bash
241
-
reflex cloud config
242
-
```
243
-
244
-
2. **Customize the `cloud.yml` file** based on your requirements using the options above
245
-
246
-
3. **Create environment file** (if needed):
247
-
```bash
248
-
touch .env
249
-
# Add your environment variables
250
-
```
251
-
252
-
4. **Deploy your application:**
253
-
```bash
254
-
reflex deploy
255
-
```
256
-
257
-
5. **Monitor deployment** through the (Reflex Cloud)[https://cloud.reflex.dev/] dashboard
258
-
259
-
## Summary
260
-
261
-
The `cloud.yml` configuration provides complete control over your Reflex Cloud deployments while maintaining simplicity. All configuration options are optional, allowing you to start with minimal setup and gradually add complexity as your application scales.
262
-
263
-
Key takeaways:
264
-
- Start with basic configuration and expand as needed
265
-
- Use multiple configuration files for different environments
266
-
- Leverage regions for global availability and redundancy
267
-
- Secure environment variables and never commit them to version control
0 commit comments