Skip to content

Commit 28d9206

Browse files
add GCP to heroku migration docs
1 parent 249e5d9 commit 28d9206

File tree

1 file changed

+66
-3
lines changed

1 file changed

+66
-3
lines changed

docs/tutorials/migrating-from-heroku.md

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This tutorial will guide you through the process of migrating your Heroku applic
1313
* [The Heroku CLI (optional, but recommended)](https://devcenter.heroku.com/articles/heroku-cli#install-the-heroku-cli)
1414
* Cloud Account Credentials
1515
* [AWS](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html)
16-
* [GCP](https://cloud.google.com/docs/authentication/set-up-adc-local-dev-environment) (coming soon)
16+
* [GCP](https://cloud.google.com/docs/authentication/set-up-adc-local-dev-environment)
1717

1818
:::tip
1919
**Do I need a Dockerfile?**
@@ -167,7 +167,7 @@ Now all you need to do is deploy your application to the cloud.
167167
168168
### Deploying to AWS
169169
170-
If you're deploying to AWS, you'll need to invoke `defang compose up` with your AWS access credentials in the environment:
170+
If you're deploying to AWS, you'll need to invoke `defang compose up --provider aws` with your AWS access credentials in the environment:
171171

172172
<details>
173173
<summary>
@@ -285,7 +285,70 @@ See our full tutorial on [deploying to AWS](/docs/tutorials/deploy-to-aws).
285285
286286
### Deploying to GCP
287287
288-
GCP support for deployments without Dockerfiles coming soon.
288+
If you're deploying to GCP, you'll need to invoke `defang compose up --provider gcp` with your GCP access credentials in the environment:
289+
290+
<details>
291+
<summary>
292+
Run the following command
293+
```
294+
GCP_PROJECT_ID=my-project-123456 defang compose up --provider gcp
295+
```
296+
</summary>
297+
```
298+
* Using Google Cloud Platform provider from command line flag
299+
! Defang cannot monitor status of the following managed service(s): [postgres release].
300+
To check if the managed service is up, check the status of the service which depends on it.
301+
! service "postgres": missing memory reservation; using provider-specific defaults. Specify deploy.resources.reservations.memory to avoid out-of-memory errors
302+
! service "web": ingress port without healthcheck defaults to GET / HTTP/1.1
303+
* Packaging the project files for web at /Users/defang/wk/vast-badlands
304+
! the build context contains more than 100 files; use --debug or create .dockerignore to exclude caches and build artifacts
305+
* Uploading the project files for web
306+
* Setting up defang CD in GCP project my-project-123456, this could take a few minutes
307+
* Packaging the project files for release at /Users/defang/wk/vast-badlands
308+
! the build context contains more than 100 files; use --debug or create .dockerignore to exclude caches and build artifacts
309+
* Uploading the project files for release
310+
* Tailing logs for deployment ID fgdh4ct0hopz ; press Ctrl+C to detach:
311+
* Showing only build logs and runtime errors. Press V to toggle verbose mode.
312+
2025-09-08T10:28:08.634-04:00 cd ** Update started for stack beta
313+
2025-09-08T10:28:17.990-04:00 cd ** Updating service "postgres"
314+
2025-09-08T10:28:44.773-04:00 cd ** Building image for "release"...
315+
2025-09-08T10:28:58.012-04:00 cd ** Building image for "web"...
316+
2025-09-08T10:47:02.479-04:00 release I, [2025-09-08T14:47:02.409371 #1] INFO -- : Migrating to CreateMembers (20240416182733)
317+
2025-09-08T10:47:02.479-04:00 release == 20240416182733 CreateMembers: migrating ====================================
318+
2025-09-08T10:47:02.479-04:00 release -- create_table(:members)
319+
2025-09-08T10:47:02.479-04:00 release -> 0.0073s
320+
2025-09-08T10:47:02.479-04:00 release == 20240416182733 CreateMembers: migrated (0.0073s) ===========================
321+
2025-09-08T10:47:02.479-04:00 release I, [2025-09-08T14:47:02.432075 #1] INFO -- : Migrating to DeviseCreateUsers (20240417165503)
322+
2025-09-08T10:47:02.479-04:00 release == 20240417165503 DeviseCreateUsers: migrating ================================
323+
2025-09-08T10:47:02.479-04:00 release -- create_table(:users)
324+
2025-09-08T10:47:02.479-04:00 release -> 0.0080s
325+
2025-09-08T10:47:02.479-04:00 release -- add_index(:users, :email, {:unique=>true})
326+
2025-09-08T10:47:02.479-04:00 release -> 0.0022s
327+
2025-09-08T10:47:02.479-04:00 release -- add_index(:users, :reset_password_token, {:unique=>true})
328+
2025-09-08T10:47:02.479-04:00 release -> 0.0021s
329+
2025-09-08T10:47:02.479-04:00 release == 20240417165503 DeviseCreateUsers: migrated (0.0124s) =======================
330+
2025-09-08T10:47:02.479-04:00 release I, [2025-09-08T14:47:02.458370 #1] INFO -- : Migrating to AddUserIdToMembers (20240417202202)
331+
2025-09-08T10:47:02.479-04:00 release == 20240417202202 AddUserIdToMembers: migrating ===============================
332+
2025-09-08T10:47:02.479-04:00 release -- add_column(:members, :user_id, :integer)
333+
2025-09-08T10:47:02.479-04:00 release -> 0.0044s
334+
2025-09-08T10:47:02.479-04:00 release -- add_index(:members, :user_id)
335+
2025-09-08T10:47:02.479-04:00 release -> 0.0019s
336+
2025-09-08T10:47:02.479-04:00 release == 20240417202202 AddUserIdToMembers: migrated (0.0064s) ======================
337+
2025-09-08T10:48:16.157-04:00 web => Booting Puma
338+
2025-09-08T10:48:16.157-04:00 web => Rails 7.1.3.2 application starting in production
339+
2025-09-08T10:48:16.157-04:00 web => Run `bin/rails server --help` for more startup options
340+
2025-09-08T10:48:18.625-04:00 web [1] Puma starting in cluster mode...
341+
2025-09-08T10:48:18.625-04:00 web [1] * Puma version: 6.4.2 (ruby 3.3.4-p94) ("The Eagle of Durango")
342+
2025-09-08T10:48:18.625-04:00 web [1] * Min threads: 5
343+
2025-09-08T10:48:18.625-04:00 web [1] * Max threads: 5
344+
2025-09-08T10:48:18.625-04:00 web [1] * Environment: production
345+
2025-09-08T10:48:18.626-04:00 web [1] * Master PID: 1
346+
2025-09-08T10:48:18.626-04:00 web [1] * Workers: 2
347+
2025-09-08T10:48:18.626-04:00 web [1] * Restarts: (✔) hot (✔) phased
348+
2025-09-08T10:48:18.626-04:00 web [1] * Listening on http://0.0.0.0:5000
349+
2025-09-08T10:48:18.627-04:00 web [1] Use Ctrl-C to stop
350+
```
351+
</details>
289352
290353
## Step 3 - Migrating your data
291354

0 commit comments

Comments
 (0)