Elements Manual
Elements 2 Manual
Elements 2 Manual
  • Welcome 👋
  • QUICK START
    • Elements in Five Minutes or Less
  • General
    • General Concepts
    • N-Tier Architecture
    • Security Model
  • SCRIPTING ENGINE
    • Scripting Engine Overview
      • Intro to Resources and Cloud Functions
      • Horizontal Scaling Model
      • Database Access
      • Server-to-Server API Calls
      • Deploy Cloud Functions via Git
      • Creating and Destroying Resources
      • Cross-Resource Invocation
      • Indexing Resources
      • Coroutines
      • Manifest
  • Core Features
    • Core API Overview
    • Sessions
    • Applications
      • Facebook Application Configuration
      • Firebase Application Configuration
      • Amazon GameOn Application Configuration
      • iOS Application Configuration
      • Android Application Configuration
      • Matchmaking Application Configuration [deprecated]
    • Users and Profiles
    • Digital Goods
    • Progress and Missions
    • Leaderboards
    • Matchmaking
    • Followers
    • Friends
    • Reward Issuance
    • Push Notifications
    • Auth Schemes
    • Save Data
    • Schemas and Metadata Specifications
    • Queries
      • Base Query Syntax
      • Boolean Queries
      • Object Graph Navigation
      • Advanced Operators
        • .ref
        • .name
  • Web 3
    • Omni Chain Support
    • Vaults
    • Wallets
    • Smart Contracts
      • Smart Contracts: Ethereum
      • Smart Contracts: Flow
      • Smart Contracts: Solana
      • Smart Contracts: Neo
    • Know Your Customer
      • Formidium
  • CONFIGURATION
    • Using the Web Console
    • iOS and Android Product Bundles
    • Direct Database Access and Batch Configuration
  • UNITY PLUG-INS
    • Unity Plugin
    • Content Delivery Management and Unity CDN Plugin
  • DEPLOYMENT
    • Deployment Overview
      • Docker Containers
      • AWS Deployment
      • Standalone docker-compose
  • LUA SAMPLES
    • lua Samples
      • main.lua
      • event.lua
      • hello_world.lua
      • model.lua
      • startup.lua
      • HTTP Manifest
        • Example endpoint handler
        • Example operations table
  • RESTful APIs
    • Swagger and Swagger UI
    • Elements 3.0.X (Preview)
      • Applications
      • Friends and Followers
      • Digital Goods and Inventory
      • Leaderboards
      • Missions and Rewards
      • User and Profiles
      • Save Data
      • Custom Metadata
Powered by GitBook
On this page
  • Git Repository Location
  • Adding a Git Remote
  • Pushing to the Repository
  • After the Push
  1. SCRIPTING ENGINE
  2. Scripting Engine Overview

Deploy Cloud Functions via Git

Deploying Cloud Functions via Git is a lightweight approach to managing Elements' powerful API functionality.

PreviousServer-to-Server API CallsNextCreating and Destroying Resources

Last updated 2 years ago

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 .

Git Repository Location

If you're running a local instance of Elements, your repository will be located at http://localhost:8082/code-serve/git/APPNAME, where APPNAME is the name of the you created in Elements.

If your Elements instance is hosted remotely, you can find the repository at https://this.is.your.url/code-serve/git/APPNAME.

Adding a Git Remote

You may find it useful to create a remote for your repository as well. For example:

git remote add app-code https://root:root@this.is.your.url/code-serve/APPNAME

As you can see in the above example, 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 repository 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:

  • api

  • app-serve

  • app-node

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.

code-serve container
application