Back

[SOLVED] Share local development instance across multiple devices

  • 0
  • General
Iron
13 Apr, 2023, 16:53

I want to start to work on a new project, but I don't have a server at the time, so I would host appwrite on my local machine for development. I would like to share the configuration of the appwrite server (collections, collection attributes, cloud functions, etc) across my desktop and my laptop, to be able to work on the go. Is it possible to do so using git?

TL;DR
To share the configuration of the Appwrite server across multiple devices, you can use a seed script or upload the configuration to GitHub. This will allow you to work on the go. If you only need the configuration and not the data, you can also replicate the volumes where the data is stored.
Arth
13 Apr, 2023, 16:59

You can write a seed script to achieve that, alternatively all the data is stored on volumes (which you can replicate)

Iron
13 Apr, 2023, 17:02

I don't need the data, only the configuration

Arth
13 Apr, 2023, 17:02

the configuration i.e the collections, functions are also stored on the volumes I believe

Arth
13 Apr, 2023, 17:03

I would recommend writing a seed script instead though and upload that to gh

Iron
13 Apr, 2023, 17:03

How can I do so?

Arth
13 Apr, 2023, 17:04

just write a script using server side sdk which creates collections, adds attributes (if they don't exist) and also the code for cloud functions (if any) and the script should deploy them aswell

Drake
13 Apr, 2023, 17:14

If you're not going to make incremental changes and you're okay with wiping and starting fresh each time, you can use the Appwrite CLI: https://appwrite.io/docs/command-line-deployment

Iron
13 Apr, 2023, 17:16

What do you mean with "incremental changes"?

Drake
13 Apr, 2023, 17:22

For example if you need to add an attribute in the future

Iron
13 Apr, 2023, 17:23

What would be the problem?

Drake
13 Apr, 2023, 17:23

With the CLI, when you deploy a collection, it wipes the existing attributes and indexes and then deploys what's in the config file

Drake
13 Apr, 2023, 17:24

So if you need incremental changes, Arth's approach is best for collections.

CLI is still best for function deployment

Iron
13 Apr, 2023, 17:24

Ok

joeyouss
24 Apr, 2023, 08:06

[SOLVED] Share local development instance across multiple devices

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more