Deploy Cloud Functions via Git
This section will describe how to upload your application's server code via Git.
Each application in your Elements instance has its own git repository where the server code resides, in the code-serve container.
Git Repository Location
If your Elements instance is hosted remotely, you can find the repository at
Adding a Git Remote
You may find it useful to create a remote for your repository as well, for example with:
git remote add app-code https://root:email@example.com/code-serve/APPNAME
As you can see in the above example, your user credentials are included. Otherwise, you will need to supply your credentials each time you push to the repository.
A superuser account is required in order to push.
Pushing to the Repository
You may push your code up to the respository using normal git commands. For example:
git push -f app-code master:master
In the above example, we are using the remote we established in the previous section.
After the Push
In order to have Elements run the newly pushed code, you must restart certain containers:
If you're running Elements locally, you can restart each of these containers with the
docker restart command.
TODO Update when hot code loading is implemented.