Back

[SOLVED] Are There Appwrite Profiles?

  • 0
  • Tools
itsjustintime
30 Dec, 2023, 23:16

I have 2 projects in my organization. One is used as my staging environment and one is used as my prod environment.

When I initialize an Appwrite project, I get my appwrite.json with one level of data. Is there a way to configure it such that I can have more flexibility in what Appwrite is targeting?

For example, having a payload

TypeScript
"env":
{ "staging": {
    "projectId": "12345",
    "projectName": "App Staging"
   },
   "prod": {
      "projectId": "12ABC",
      "projectName": "App"
   }
}
"default": "staging"

and having the ability to run CLI commands like this: appwrite functions createDeployment <stuff> --profile staging

I'm not necessarily proposing the implemntation details. This is just referencing what AWS CLI does when you have multiple roles.

Is there something that exists that can handle this?

TL;DR
There is currently no built-in feature for profile switching in Appwrite. However, a workaround suggested by users is to have multiple appwrite.json files and use a symlink to switch between them. Another user mentioned a feature request for profile switching that could be extended to project switching in the future.
Drake
30 Dec, 2023, 23:30

This sounds like a good feature request.

For now, I'd have multiple appwrite.json files and maybe use a symlink to switch between the two.

itsjustintime
30 Dec, 2023, 23:32

That's a great workaround. Thanks!

ideclon
31 Dec, 2023, 00:19

Isn’t a “profile switching” feature already planned? IIRC, it was more planned for server/user switching, but it could be extended to project switching?

Drake
31 Dec, 2023, 00:19

Ya, there's a feature request for that

ideclon
1 Jan, 2024, 00:50

If your issue has been solved, you can mark this post as closed by adding “[SOLVED]” to the beginning of the title

itsjustintime
1 Jan, 2024, 01:00

[SOLVED] Are There Appwrite Profiles?

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