ai-api-ollama / DEVELOPMENT.md
cygon
Initial deployment with Ollama support
d61feef

Getting Started

This project consists of an Encore application. Follow the steps below to get the app running locally.

Prerequisites

If this is your first time using Encore, you need to install the CLI that runs the local development environment. Use the appropriate command for your system:

  • macOS: brew install encoredev/tap/encore
  • Linux: curl -L https://encore.dev/install.sh | bash
  • Windows: iwr https://encore.dev/install.ps1 | iex

You also need to have bun installed for package management. If you don't have bun installed, you can install it by running:

npm install -g bun

Running the Application

Backend Setup

  1. Navigate to the backend directory:

    cd backend
    
  2. Start the Encore development server:

    encore run
    

The backend will be available at the URL shown in your terminal (typically http://localhost:4000).

Deployment

Self-hosting

See the self-hosting instructions for how to use encore build docker to create a Docker image and configure it.

Encore Cloud Platform

Step 1: Login to your Encore Cloud Account

Before deploying, ensure you have authenticated the Encore CLI with your Encore account (same as your Leap account)

encore auth login

Step 2: Set Up Git Remote

Add Encore's git remote to enable direct deployment:

git remote add encore encore://scalable-ai-api-service-ysyi

Step 3: Deploy Your Application

Deploy by pushing your code:

git add -A .
git commit -m "Deploy to Encore Cloud"
git push encore

Monitor your deployment progress in the Encore Cloud dashboard.

GitHub Integration (Recommended for Production)

For production applications, we recommend integrating with GitHub instead of using Encore's managed git:

Connecting Your GitHub Account

  1. Open your app in the Encore Cloud dashboard
  2. Navigate to Encore Cloud GitHub Integration settings
  3. Click Connect Account to GitHub
  4. Grant access to your repository

Once connected, pushing to your GitHub repository will automatically trigger deployments. Encore Cloud Pro users also get Preview Environments for each pull request.

Deploy via GitHub

After connecting GitHub, deploy by pushing to your repository:

git add -A .
git commit -m "Deploy via GitHub"
git push origin main

Additional Resources