@@ -163,15 +163,123 @@ services:
163
163
164
164
## Step 2 - Deploying to your cloud account
165
165
166
- Now all you need to do is deploy your application to the cloud.
166
+ Now all you need to do is deploy your application to the cloud.
167
167
168
168
### Deploying to AWS
169
169
170
170
If you're deploying to AWS, you'll need to invoke ` defang compose up` with your AWS access credentials in the environment:
171
171
172
+ <details>
173
+ <summary>
174
+ Run the following command
172
175
```
173
176
AWS_REGION=us-west-2 AWS_PROFILE=default defang compose up --provider aws
174
177
```
178
+ </summary>
179
+
180
+ ```
181
+ * Using Defang Playground provider from stored preference
182
+ ! Defang cannot monitor status of the following managed service(s): [ postgres] .
183
+ To check if the managed service is up, check the status of the service which depends on it.
184
+ * Packaging the project files for release at /Users/defang/w/vast-badlands
185
+ * Uploading the project files for release
186
+ * Packaging the project files for web at /Users/defang/w/vast-badlands
187
+ * Uploading the project files for web
188
+ * Monitor your services' status in the defang portal
189
+ - https://portal.defang.io/service/postgres
190
+ - https://portal.defang.io/service/release
191
+ - https://portal.defang.io/service/web
192
+ * Tailing logs for deployment ID qhjwfbi6p1re ; press Ctrl+C to detach:
193
+ 2025-08-28T14:46:14.632-07:00 cd Update started for stack defang-prod1
194
+ 2025-08-28T14:46:17.801-07:00 cd ** Updating service "postgres"
195
+ 2025-08-28T14:46:17.869-07:00 cd ** Building image for "release"...
196
+ 2025-08-28T14:46:17.931-07:00 cd ** Building image for "web"...
197
+ 2025-08-28T14:46:17.946-07:00 cd ** Updating service "web"
198
+ 2025-08-28T14:46:20.003-07:00 cd ** Updated service "postgres" to revision 1
199
+ 2025-08-28T14:47:00.757-07:00 postgres The files belonging to this database system will be owned by user "postgres".
200
+ 2025-08-28T14:47:00.757-07:00 postgres This user must also own the server process.
201
+ 2025-08-28T14:47:00.758-07:00 postgres The database cluster will be initialized with locale "en_US.utf8".
202
+ 2025-08-28T14:47:00.758-07:00 postgres The default database encoding has accordingly been set to "UTF8".
203
+ 2025-08-28T14:47:00.758-07:00 postgres The default text search configuration will be set to "english".
204
+ 2025-08-28T14:47:00.758-07:00 postgres Data page checksums are disabled.
205
+ 2025-08-28T14:47:00.758-07:00 postgres fixing permissions on existing directory /var/lib/postgresql/data ... ok
206
+ 2025-08-28T14:47:00.758-07:00 postgres creating subdirectories ... ok
207
+ 2025-08-28T14:47:00.758-07:00 postgres selecting dynamic shared memory implementation ... posix
208
+ 2025-08-28T14:47:00.829-07:00 postgres selecting default "max_connections" ... 100
209
+ 2025-08-28T14:47:00.924-07:00 postgres selecting default "shared_buffers" ... 128MB
210
+ 2025-08-28T14:47:00.940-07:00 postgres selecting default time zone ... Etc/UTC
211
+ 2025-08-28T14:47:00.941-07:00 postgres creating configuration files ... ok
212
+ 2025-08-28T14:47:01.723-07:00 postgres running bootstrap script ... ok
213
+ 2025-08-28T14:47:03.232-07:00 postgres performing post-bootstrap initialization ... ok
214
+ 2025-08-28T14:47:03.368-07:00 postgres initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
215
+ 2025-08-28T14:47:03.368-07:00 postgres syncing data to disk ... ok
216
+ 2025-08-28T14:47:03.368-07:00 postgres Success. You can now start the database server using:
217
+ 2025-08-28T14:47:03.368-07:00 postgres pg_ctl -D /var/lib/postgresql/data -l logfile start
218
+ 2025-08-28T14:47:03.530-07:00 postgres waiting for server to start....2025-08-28 21:47:03.530 UTC [ 48] LOG: starting PostgreSQL 17.4 (Debian 17.4-1.pgdg120+2) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
219
+ 2025-08-28T14:47:03.533-07:00 postgres 2025-08-28 21:47:03.533 UTC [ 48] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
220
+ 2025-08-28T14:47:03.544-07:00 postgres 2025-08-28 21:47:03.544 UTC [ 51] LOG: database system was shut down at 2025-08-28 21:47:03 UTC
221
+ 2025-08-28T14:47:03.550-07:00 postgres 2025-08-28 21:47:03.550 UTC [ 48] LOG: database system is ready to accept connections
222
+ 2025-08-28T14:47:03.639-07:00 postgres done
223
+ 2025-08-28T14:47:03.639-07:00 postgres server started
224
+ 2025-08-28T14:47:04.033-07:00 postgres CREATE DATABASE
225
+ 2025-08-28T14:47:04.034-07:00 postgres /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
226
+ 2025-08-28T14:47:04.035-07:00 postgres waiting for server to shut down....2025-08-28 21:47:04.035 UTC [ 48] LOG: received fast shutdown request
227
+ 2025-08-28T14:47:04.039-07:00 postgres 2025-08-28 21:47:04.039 UTC [ 48] LOG: aborting any active transactions
228
+ 2025-08-28T14:47:04.040-07:00 postgres 2025-08-28 21:47:04.040 UTC [ 48] LOG: background worker "logical replication launcher" (PID 54) exited with exit code 1
229
+ 2025-08-28T14:47:04.043-07:00 postgres 2025-08-28 21:47:04.042 UTC [ 49] LOG: shutting down
230
+ 2025-08-28T14:47:04.045-07:00 postgres 2025-08-28 21:47:04.045 UTC [ 49] LOG: checkpoint starting: shutdown immediate
231
+ 2025-08-28T14:47:04.158-07:00 postgres 2025-08-28 21:47:04.158 UTC [ 49] LOG: checkpoint complete: wrote 921 buffers (5.6%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.097 s, sync=0.008 s, total=0.116 s; sync files=301, longest=0.003 s, average=0.001 s; distance=4238 kB, estimate=4238 kB; lsn=0/1908990, redo lsn=0/1908990
232
+ 2025-08-28T14:47:04.164-07:00 postgres 2025-08-28 21:47:04.164 UTC [ 48] LOG: database system is shut down
233
+ 2025-08-28T14:47:03.368-07:00 postgres initdb: warning: enabling "trust" authentication for local connections
234
+ 2025-08-28T14:47:04.235-07:00 postgres done
235
+ 2025-08-28T14:47:04.235-07:00 postgres server stopped
236
+ 2025-08-28T14:47:04.238-07:00 postgres PostgreSQL init process complete; ready for start up.
237
+ 2025-08-28T14:47:04.269-07:00 postgres 2025-08-28 21:47:04.269 UTC [ 1] LOG: starting PostgreSQL 17.4 (Debian 17.4-1.pgdg120+2) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
238
+ 2025-08-28T14:47:04.323-07:00 postgres 2025-08-28 21:47:04.323 UTC [ 1] LOG: listening on IPv4 address "0.0.0.0", port 5432
239
+ 2025-08-28T14:47:04.324-07:00 postgres 2025-08-28 21:47:04.323 UTC [ 1] LOG: listening on IPv6 address "::", port 5432
240
+ 2025-08-28T14:47:04.329-07:00 postgres 2025-08-28 21:47:04.329 UTC [ 1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
241
+ 2025-08-28T14:47:04.338-07:00 postgres 2025-08-28 21:47:04.338 UTC [ 64] LOG: database system was shut down at 2025-08-28 21:47:04 UTC
242
+ 2025-08-28T14:47:04.345-07:00 postgres 2025-08-28 21:47:04.345 UTC [ 1] LOG: database system is ready to accept connections
243
+ 2025-08-28T14:51:54.551-07:00 cd ** Build succeeded for "web"
244
+ 2025-08-28T14:51:56.626-07:00 cd ** Build succeeded for "release"
245
+ 2025-08-28T14:52:04.407-07:00 postgres 2025-08-28 21:52:04.407 UTC [ 62] LOG: checkpoint starting: time
246
+ 2025-08-28T14:52:06.028-07:00 postgres 2025-08-28 21:52:06.027 UTC [ 62] LOG: checkpoint complete: wrote 19 buffers (0.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=1.609 s, sync=0.004 s, total=1.621 s; sync files=11, longest=0.003 s, average=0.001 s; distance=28 kB, estimate=28 kB; lsn=0/190FA40, redo lsn=0/190F9E8
247
+ 2025-08-28T14:52:32.418-07:00 release I, [ 2025-08-28T21:52:32.392682 #1 ] INFO -- : Migrating to CreateMembers (20240416182733)
248
+ 2025-08-28T14:52:32.418-07:00 release == 20240416182733 CreateMembers: migrating ====================================
249
+ 2025-08-28T14:52:32.418-07:00 release -- create_table(: members )
250
+ 2025-08-28T14:52:32.418-07:00 release -> 0.0029s
251
+ 2025-08-28T14:52:32.418-07:00 release == 20240416182733 CreateMembers: migrated (0.0030s) ===========================
252
+ 2025-08-28T14:52:32.418-07:00 release I, [ 2025-08-28T21:52:32.400192 #1 ] INFO -- : Migrating to DeviseCreateUsers (20240417165503)
253
+ 2025-08-28T14:52:32.418-07:00 release == 20240417165503 DeviseCreateUsers: migrating ================================
254
+ 2025-08-28T14:52:32.418-07:00 release -- create_table(: users )
255
+ 2025-08-28T14:52:32.418-07:00 release -> 0.0039s
256
+ 2025-08-28T14:52:32.418-07:00 release -- add_index(: users , : email , {: unique =>true})
257
+ 2025-08-28T14:52:32.418-07:00 release -> 0.0013s
258
+ 2025-08-28T14:52:32.418-07:00 release -- add_index(: users , : reset_password_token , {: unique =>true})
259
+ 2025-08-28T14:52:32.418-07:00 release -> 0.0008s
260
+ 2025-08-28T14:52:32.418-07:00 release == 20240417165503 DeviseCreateUsers: migrated (0.0062s) =======================
261
+ 2025-08-28T14:52:32.418-07:00 release I, [ 2025-08-28T21:52:32.409275 #1 ] INFO -- : Migrating to AddUserIdToMembers (20240417202202)
262
+ 2025-08-28T14:52:32.418-07:00 release == 20240417202202 AddUserIdToMembers: migrating ===============================
263
+ 2025-08-28T14:52:32.418-07:00 release -- add_column(: members , : user_id , : integer )
264
+ 2025-08-28T14:52:32.418-07:00 release -> 0.0012s
265
+ 2025-08-28T14:52:32.418-07:00 release -- add_index(: members , : user_id )
266
+ 2025-08-28T14:52:32.418-07:00 release -> 0.0009s
267
+ 2025-08-28T14:52:32.418-07:00 release == 20240417202202 AddUserIdToMembers: migrated (0.0022s) ======================
268
+ 2025-08-28T14:52:45.061-07:00 cd ** Updated service "web" to revision 1
269
+ 2025-08-28T14:52:49.353-07:00 cd Update succeeded in 6m34.758057781s ; provisioning...
270
+ 2025-08-28T14:53:32.118-07:00 web => Booting Puma
271
+ 2025-08-28T14:53:32.119-07:00 web => Rails 7.1.3.2 application starting in production
272
+ 2025-08-28T14:53:32.119-07:00 web => Run ` bin/rails server --help ` for more startup options
273
+ 2025-08-28T14:53:34.228-07:00 web Puma starting in single mode...
274
+ 2025-08-28T14:53:34.228-07:00 web * Puma version: 6.4.2 (ruby 3.3.4-p94) ("The Eagle of Durango")
275
+ 2025-08-28T14:53:34.228-07:00 web * Min threads: 5
276
+ 2025-08-28T14:53:34.228-07:00 web * Max threads: 5
277
+ 2025-08-28T14:53:34.228-07:00 web * Environment: production
278
+ 2025-08-28T14:53:34.228-07:00 web * PID: 1
279
+ 2025-08-28T14:53:34.230-07:00 web * Listening on http://0.0.0.0:5000
280
+ 2025-08-28T14:53:34.232-07:00 web Use Ctrl-C to stop
281
+ ```
282
+ </details>
175
283
176
284
See our full tutorial on [deploying to AWS](/docs/tutorials/deploy-to-aws).
177
285
0 commit comments