Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.
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
2 changes: 1 addition & 1 deletion app/views/docs/migrations-cloud-to-local.phtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p>
Moving to a self-hosted instance? We've got you covered.
If you're moving your projects from Appwrite Cloud to self-hosted, we've got you covered.
Migrations makes it as easy as a couple clicks to move all of your Appwrite Cloud project data to a self-hosted instance.
</p>

Expand Down
127 changes: 117 additions & 10 deletions app/views/docs/migrations-firebase.phtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p>
Moving your project from Firebase to Appwrite?
Appwrite Migrations can help you streamline the process.

Here's what you need to know to get started.
</p>

Expand All @@ -16,10 +16,10 @@

<h2><a href="#migration-process" id="migration-process">Migrating to Appwrite from Firebase</a></h2>
<p>
To begin migrating to Appwrite make sure to read the <a href="/docs/migrations">migration overview</a>
To begin migrating to Appwrite make sure to read the <a href="/docs/migrations">migration overview</a>
and <a href="#notices">things to keep in mind</a> sections above.
</p>

<ol class="margin-top margin-bottom-large text-size-normal">
<li>
Create a new project and click on the <b>Migrations</b> tab.
Expand All @@ -28,21 +28,23 @@
Click on the <b>Create Migration</b> button and select <b>Firebase</b> as your source.
</li>
<li>
Depending on where your Appwrite project is hosted, you'll need to use different methods to authorize with Firebase.
Depending on where your Appwrite project is hosted, you'll need to use different methods to authorize with Firebase.
See the <a href="#cloud">Cloud</a> and <a href="#self-hosted">Self-hosting</a> sections for details.
</li>
<li>
Finally, add the platforms for your <a href="/docs/getting-started-for-web">Web</a>, <a href="getting-started-for-flutter/docs/getting-started-for-flutter">Flutter</a>, <a href="/docs/getting-started-for-android">Android</a>, and <a href="/docs/getting-started-for-apple">iOS</a> apps.
</li>
</ol>

<h3><a href="#cloud" id="cloud">Appwrite Cloud</a></h3>
<h3><a href="#cloud" id="cloud">Migrate to Cloud</a></h3>
<p>
To simplify the migration process we have created an OAuth application that will allow you to sign in with Google and automatically
discover your Firebase projects. Simply select the source project and follow the migration wizard.
</p>

<h3><a href="#self-hosted" id="self-hosted">Migrating to Appwrite Self-Hosted</a></h3>
<p>After completing the migration wizard, migration will begin. Return to step 4 of <a href="#migration-process">the migration steps</a>.</p>

<h3><a href="#self-hosted" id="self-hosted">Migrating to Self-Hosted</a></h3>
<p>
If you are self-hosting Appwrite you will need to create a service account in your Firebase project and download the JSON file.
</p>
Expand All @@ -55,12 +57,117 @@
Click the gear icon to access your <b>Project Settings</b>.
</li>
<li>
Click <b>Service Accounts</b>, then <b>Generate New Private Key</b>. Don't share this key with anyone!
Click on <b>Service Accounts</b>, then click on the <b>Manage service account permissions</b> link redirecting you to the Google Cloud Console.
</li>
<li>
Once you've downloaded your private key, head back to Appwrite and click <b>Manual Authentication</b>.
Click on <b>Create Service Account</b>, give it a name, id and description you want, then click <b>Continue</b>.
</li>
<li>
Upload the JSON private key and follow the wizard.
Next you'll be prompted to grant the service account roles. You need to grant the following roles.
</li>
</ol>
<table class="full text-size-small">
<thead>
<tr>
<th>Role</th>
<th>Reason<br></th>
</tr>
</thead>
<tbody>
<tr>
<td>Firebase Viewer</td>
<td>Read access to your entire Firebase project including Database and Storage.<br></td>
</tr>
<tr>
<td>Identity Toolkit Viewer</td>
<td>Read access to your users including their hash config.<br></td>
</tr>
</tbody>
</table>
<li>If you prefer to create a custom role, you can use the following permissions.</li>
<table class="full text-size-small">
<thead>
<tr>
<th>Permission</th>
<th>Reason</th>
</tr>
</thead>
<tbody>
<tr>
<td>datastore.databases.get</td>
<td>Read access to your Firestore database.</td>
</tr>
<tr>
<td>datastore.databases.list</td>
<td>Read access to your Firestore database.</td>
</tr>
<tr>
<td>datastore.entities.get</td>
<td>Read access to your Firestore database's documents.</td>
</tr>
<tr>
<td>datastore.entities.list</td>
<td>Read access to your Firestore database's documents.</td>
</tr>
<tr>
<td>datastore.indexes.get</td>
<td>Read access to your Firestore database's indexes.</td>
</tr>
<tr>
<td>datastore.indexes.list</td>
<td>Read access to your Firestore database's indexes.</td>
</tr>
<tr>
<td>firebaseauth.configs.get</td>
<td>Read access to your Firebase project's authentication configs.</td>
</tr>
<tr>
<td>firebaseauth.configs.getHashConfig</td>
<td>Read access to your Firebase project's authentication configs including hash salt.</td>
</tr>
<tr>
<td>firebaseauth.configs.getSecret</td>
<td>Read access to your Firebase project's authentication configs including secret.</td>
</tr>
<tr>
<td>firebaseauth.users.get</td>
<td>Read access to your Firebase project's users.</td>
</tr>
<tr>
<td>identitytoolkit.tenants.get</td>
<td>Read access to your Firebase project's users.</td>
</tr>
<tr>
<td>identitytoolkit.tenants.list</td>
<td>Read access to your Firebase project's users.</td>
</tr>
<tr>
<td>storage.buckets.get</td>
<td>Read access to your Firebase project's storage buckets.</td>
</tr>
<tr>
<td>storage.buckets.list</td>
<td>Read access to your Firebase project's storage buckets.</td>
</tr>
<tr>
<td>storage.objects.get</td>
<td>Read access to your Firebase project's storage objects.</td>
</tr>
<tr>
<td>storage.objects.list</td>
<td>Read access to your Firebase project's storage objects.</td>
</tr>
</tbody>
</table>
<li>
Click <b>Done</b> to create the service account. After that you'll be redirected back to the service accounts page. Select the service account you just created and click <b>Keys</b>.
</li>
<li>
Click <b>Add Key</b> and select <b>Create new key</b>. Select <b>JSON</b> as the key type and click <b>Create</b>. This will download a JSON file to your computer.
</li>
<li>
Upload the JSON file to Appwrite and follow the migration wizard.
</li>
<li>
After completing the migration wizard, migration will begin. Return to step 4 of <a href="#migration-process">the migration steps</a>.
</li>
</ol>
2 changes: 1 addition & 1 deletion app/views/docs/migrations-local-to-cloud.phtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p>
Making the move to Appwrite Cloud? We've got your back.
If you're moving your self-hosted projects to Appwrite Cloud, we've got your back.
Migrations makes it as easy as a couple clicks to move all of your self-hosted project data to a Cloud instance.
</p>

Expand Down