### Getting Started with Rails Guide Source: https://guides.rubyonrails.org/v4.2.7/getting_started.html This guide covers the initial steps for getting up and running with Ruby on Rails. It explains how to install Rails, create a new application, connect to a database, understand the application layout, and grasp the basic principles of MVC and RESTful design. It also touches upon generating initial application components. ```text Getting Started with Rails -------------------------- This guide covers getting up and running with Ruby on Rails. After reading this guide, you will know: * How to install Rails, create a new Rails application, and connect your application to a database. * The general layout of a Rails application. * The basic principles of MVC (Model, View, Controller) and RESTful design. * How to quickly generate the starting pieces of a Rails application. ``` -------------------------------- ### Aptible Getting Started: Custom Code Quickstart Source: https://www.aptible.com/docs/reference/aptible-cli/cli-commands/cli-rebuild A quick start guide for deploying custom code to the Aptible platform. ```APIDOC custom-code-quickstart Description: Quickstart for deploying custom code. Section: Getting Started ``` -------------------------------- ### Getting Started with Aptible Dockerfile Deployment Source: https://www.aptible.com/docs/dockerfile-deploy This section guides users on how to begin with Aptible's Dockerfile deployment, suggesting the deployment of a starter template or reviewing guides for deploying with Git. ```markdown If you are just getting started deploy a starter template or review guides for deploying with Git. ``` -------------------------------- ### Getting Started with Aptible Dockerfile Deployment Source: https://www.aptible.com/docs/core-concepts/apps/deploying-apps/image/deploying-with-git/overview This section guides users on how to begin with Aptible's Dockerfile deployment, suggesting the deployment of a starter template or reviewing guides for deploying with Git. ```markdown If you are just getting started deploy a starter template or review guides for deploying with Git. ``` -------------------------------- ### Deploy Starter Templates Source: https://www.aptible.com/docs/reference/glossary Guides for deploying pre-configured starter templates for popular web frameworks on Aptible. These examples simplify the initial setup process for new projects. ```en Ruby on Rails - Starter Template: Deploy a starter template Ruby on Rails app on Aptible Node.js + Express - Starter Template: Deploy a starter template Node.js app using the Express framework on Aptible Python + Django - Starter Template: Deploy a starter template Python app using the Django framework on Aptible PHP + Laravel - Starter Template: Deploy a starter template PHP app using the Laravel framework on Aptible Python + Flask - Demo App: Deploy our Python demo app using the Flask framework with Managed PostgreSQL Database and Redis instance ``` -------------------------------- ### Aptible Starter Templates Source: https://www.aptible.com/docs/how-to-guides/app-guides/integrate-aptible-with-ci/codeship Guides for deploying starter templates for various popular web frameworks on Aptible. These examples simplify the initial setup and deployment process for common application stacks. ```APIDOC APIDOC: Group: Starter Templates Description: Deploy starter templates for various frameworks on Aptible. Ruby on Rails - Starter Template: Description: Deploy a starter template Ruby on Rails app on Aptible. URL: /getting-started/deploy-starter-template/ruby-on-rails Node.js + Express - Starter Template: Description: Deploy a starter template Node.js app using the Express framework on Aptible. URL: /getting-started/deploy-starter-template/node-js Python + Django - Starter Template: Description: Deploy a starter template Python app using the Django framework on Aptible. URL: /getting-started/deploy-starter-template/python-django PHP + Laravel - Starter Template: Description: Deploy a starter template PHP app using the Laravel framework on Aptible. URL: /getting-started/deploy-starter-template/php-laravel Python + Flask - Demo App: Description: Deploy our Python demo app using the Flask framework with Managed PostgreSQL Database and Redis instance. URL: /getting-started/deploy-starter-template/python-flask ``` -------------------------------- ### Aptible Getting Started Guides Source: https://www.aptible.com/docs/core-concepts/architecture/reliability-division Guides for deploying applications and databases on Aptible. Covers starter templates for popular frameworks and custom code deployment. ```APIDOC Aptible Deployment Guides: Deploy Starter Template: - Overview: Learn about deploying starter templates. - Ruby on Rails: Deploy a starter template Ruby on Rails app. - Node.js + Express: Deploy a starter template Node.js app using Express. - Python + Django: Deploy a starter template Python app using Django. - PHP + Laravel: Deploy a starter template PHP app using Laravel. - Python + Flask: Deploy a Python demo app using Flask with Managed PostgreSQL and Redis. Deploy Custom Code: - Guide: Learn how to deploy your custom code on Aptible. ``` -------------------------------- ### Aptible Starter Templates Source: https://www.aptible.com/docs/core-concepts/managed-databases/managing-databases/overview Guides for deploying starter templates for various popular web frameworks on Aptible. These examples simplify the initial setup and deployment process for common application stacks. ```APIDOC APIDOC: Group: Starter Templates Description: Deploy starter templates for various frameworks on Aptible. Ruby on Rails - Starter Template: Description: Deploy a starter template Ruby on Rails app on Aptible. URL: /getting-started/deploy-starter-template/ruby-on-rails Node.js + Express - Starter Template: Description: Deploy a starter template Node.js app using the Express framework on Aptible. URL: /getting-started/deploy-starter-template/node-js Python + Django - Starter Template: Description: Deploy a starter template Python app using the Django framework on Aptible. URL: /getting-started/deploy-starter-template/python-django PHP + Laravel - Starter Template: Description: Deploy a starter template PHP app using the Laravel framework on Aptible. URL: /getting-started/deploy-starter-template/php-laravel Python + Flask - Demo App: Description: Deploy our Python demo app using the Flask framework with Managed PostgreSQL Database and Redis instance. URL: /getting-started/deploy-starter-template/python-flask ``` -------------------------------- ### Aptible Starter Templates Source: https://www.aptible.com/docs/core-concepts/managed-databases/supported-databases/mongodb Guides for deploying starter templates for various popular web frameworks on Aptible. These examples simplify the initial setup and deployment process for common application stacks. ```APIDOC APIDOC: Group: Starter Templates Description: Deploy starter templates for various frameworks on Aptible. Ruby on Rails - Starter Template: Description: Deploy a starter template Ruby on Rails app on Aptible. URL: /getting-started/deploy-starter-template/ruby-on-rails Node.js + Express - Starter Template: Description: Deploy a starter template Node.js app using the Express framework on Aptible. URL: /getting-started/deploy-starter-template/node-js Python + Django - Starter Template: Description: Deploy a starter template Python app using the Django framework on Aptible. URL: /getting-started/deploy-starter-template/python-django PHP + Laravel - Starter Template: Description: Deploy a starter template PHP app using the Laravel framework on Aptible. URL: /getting-started/deploy-starter-template/php-laravel Python + Flask - Demo App: Description: Deploy our Python demo app using the Flask framework with Managed PostgreSQL Database and Redis instance. URL: /getting-started/deploy-starter-template/python-flask ``` -------------------------------- ### Python APTible LLM Client Usage Source: https://www.twingate.com/docs/aptible/ Demonstrates how to use the APTible LLM Python client to interact with the API. Includes initializing the client, listing models, getting model details, creating text completions (both standard and streaming), and generating embeddings. ```Python from aptible_llms import LLMClient # Initialize the client client = LLMClient(api_key="YOUR_APTIBLE_API_KEY") # List available models models = client.list_models() print("Available models:", models) # Get details for a specific model model_details = client.get_model("gpt-3.5-turbo") print("Model details:", model_details) # Create a text completion completion = client.create_completion( model_id="gpt-3.5-turbo", prompt="What is the capital of France?", max_tokens=50 ) print("Completion:", completion) # Create a streaming completion for chunk in client.create_streaming_completion( model_id="gpt-3.5-turbo", prompt="Tell me a joke.", max_tokens=100 ): print(chunk, end="", flush=True) # Create embeddings embedding = client.create_embedding( model_id="text-embedding-ada-002", input="This is a sample text for embedding." ) print("Embedding:", embedding) ``` -------------------------------- ### Automated Aptible Deployment with Twingate CLI Source: https://www.twingate.com/docs/aptible/ Initiates the automated deployment of a Twingate Connector to an Aptible environment using the Twingate CLI. This process requires the Twingate CLI and Aptible CLI to be installed and configured, along with a Twingate API token. The command prompts for necessary account details and network selection. ```bash ./tg deploy aptible app --environment NAME ``` -------------------------------- ### APTible LLM API Reference Source: https://www.twingate.com/docs/aptible/ This section details the APTible LLM API endpoints, including base URL, available models, and methods for text completion, streaming completion, and embeddings. It outlines parameters, return values, and provides example requests. ```APIDOC Base URL: https://api.aptible.com/v1/llms Models: - list_models() Description: Retrieves a list of available LLM models. Parameters: None Returns: A JSON object containing a list of model names and their details. Example: GET /models - get_model(model_id: str) Description: Retrieves details for a specific LLM model. Parameters: - model_id (str): The unique identifier for the model. Returns: A JSON object with the model's details. Example: GET /models/{model_id} Completions: - create_completion(model_id: str, prompt: str, max_tokens: int = 150, temperature: float = 0.7) Description: Generates text completion based on a prompt. Parameters: - model_id (str): The ID of the model to use for completion. - prompt (str): The input text to generate a completion for. - max_tokens (int, optional): The maximum number of tokens to generate. Defaults to 150. - temperature (float, optional): Controls randomness. Higher values mean more random output. Defaults to 0.7. Returns: A JSON object containing the generated completion text. Example: POST /completions { "model_id": "gpt-3.5-turbo", "prompt": "Write a short story about a robot.", "max_tokens": 200, "temperature": 0.8 } - create_streaming_completion(model_id: str, prompt: str, max_tokens: int = 150, temperature: float = 0.7) Description: Generates text completion in a streaming fashion. Parameters: - model_id (str): The ID of the model to use for completion. - prompt (str): The input text to generate a completion for. - max_tokens (int, optional): The maximum number of tokens to generate. Defaults to 150. - temperature (float, optional): Controls randomness. Higher values mean more random output. Defaults to 0.7. Returns: A stream of JSON objects, each containing a chunk of the generated text. Example: POST /completions/stream { "model_id": "gpt-3.5-turbo", "prompt": "Explain the concept of recursion.", "max_tokens": 100, "temperature": 0.6 } Embeddings: - create_embedding(model_id: str, input: str | list[str]) Description: Generates embeddings for the given input text. Parameters: - model_id (str): The ID of the model to use for embeddings. - input (str | list[str]): The text or list of texts to embed. Returns: A JSON object containing the embeddings. Example: POST /embeddings { "model_id": "text-embedding-ada-002", "input": "This is a test sentence." } ``` -------------------------------- ### Getting Started Source: https://www.aptible.com/docs/how-to-guides/app-guides/define-services Introduction and initial steps for using Aptible, including deploying custom code. ```markdown getting-started/introduction getting-started/deploy-custom-code ``` -------------------------------- ### Basic Express Server Setup Source: https://expressjs.com/ Demonstrates how to install Express using npm, create a basic web server, define a route for the root URL, and start the server to listen for incoming requests. This snippet is fundamental for getting started with Express. ```bash $ npm install express --save ``` ```javascript const express = require('express') const app = express() const port = 3000 app.get('/', (req, res) => { res.send('Hello World!') }) app.listen(port, () => { console.log(`Example app listening on port ${port}`) }) ``` -------------------------------- ### Grafana Getting Started and Learning Source: https://grafana.com/ Resources for new users to begin with Grafana, including setup guides, dashboard creation tutorials, and structured learning paths. Covers both Grafana OSS and Grafana Cloud. ```APIDOC Grafana Getting Started & Learning: - Get started with Grafana: - Description: Initial setup and configuration for Grafana. - Documentation: /docs/grafana/latest/getting-started/ - Build your first dashboard: - Description: Tutorial on creating and customizing Grafana dashboards. - Documentation: /docs/grafana/latest/getting-started/build-first-dashboard/ - Get started with Grafana Cloud: - Description: Onboarding guide for Grafana Cloud services. - Documentation: /docs/grafana-cloud/get-started/ - Learning Journeys: - Description: Expert-guided paths to master the Grafana platform. - Documentation: /docs/learning-journeys/ ``` -------------------------------- ### Dockerfile: Bundle Install Example Source: https://www.aptible.com/docs/how-to-guides/app-guides/make-docker-deploys-faster An example command showing how to install Ruby gems using Bundler within a Dockerfile. This is often part of a multi-language setup or a Ruby-specific application. ```dockerfile RUN bundle install ``` -------------------------------- ### Getting Started with Docker on Aptible Source: https://www.aptible.com/docs/core-concepts/managed-databases/supported-databases/postgresql A beginner's guide to using Docker with Aptible. ```APIDOC how-to-guides/app-guides/getting-started-with-docker ``` -------------------------------- ### Aptible How-To Guides: Database Source: https://www.aptible.com/docs/getting-started/introduction Guides for database management, including configuring PostgreSQL databases and connecting to Fivetran. ```APIDOC configure-aptible-postgresql-databases Description: Steps to configure Aptible PostgreSQL databases. connect-to-fivetran Description: Instructions for connecting Fivetran with Aptible databases. ``` -------------------------------- ### Deploy Starter Templates Source: https://www.aptible.com/docs/how-to-guides/database-guides/automate-database-migrations Guides users through deploying pre-configured starter templates for popular web frameworks. This simplifies the initial setup process for applications on Aptible. ```Ruby on Rails Deploy a starter template Ruby on Rails app on Aptible ``` ```Node.js + Express Deploy a starter template Node.js app using the Express framework on Aptible ``` ```Python + Django Deploy a starter template Python app using the Django framework on Aptible ``` ```PHP + Laravel Deploy a starter template PHP app using the Laravel framework on Aptible ``` ```Python + Flask Deploy our Python demo app using the Flask framework with Managed PostgreSQL Database and Redis instance ``` -------------------------------- ### Deploy Starter Templates Source: https://www.aptible.com/docs/reference/aptible-cli/cli-commands/cli-endpoints-grpc-create Guides for deploying pre-configured starter applications on Aptible. Covers popular frameworks like Ruby on Rails, Node.js with Express, Python with Django and Flask, and PHP with Laravel. Includes instructions for setting up managed databases and Redis instances. ```APIDOC APIDOC: Group: Getting Started / Deploy Starter Template Pages: - title: Deploy a starter template sidebarTitle: Overview description: Deploy a starter template href: /getting-started/deploy-starter-template/overview - title: Ruby on Rails - Starter Template sidebarTitle: Ruby on Rails description: Deploy a starter template Ruby on Rails app on Aptible href: /getting-started/deploy-starter-template/ruby-on-rails - title: Node.js + Express - Starter Template sidebarTitle: Node.js + Express description: Deploy a starter template Node.js app using the Express framework on Aptible href: /getting-started/deploy-starter-template/node-js - title: Python + Django - Starter Template sidebarTitle: Python + Django description: Deploy a starter template Python app using the Django framework on Aptible href: /getting-started/deploy-starter-template/python-django - title: PHP + Laravel - Starter Template sidebarTitle: PHP + Laravel description: Deploy a starter template PHP app using the Laravel framework on Aptible href: /getting-started/deploy-starter-template/php-laravel - title: Python + Flask - Demo App sidebarTitle: Python + Flask description: Deploy our Python demo app using the Flask framework with Managed PostgreSQL Database and Redis instance href: /getting-started/deploy-starter-template/python-flask ``` -------------------------------- ### Aptible App Guides Source: https://www.aptible.com/docs/core-concepts/apps/deploying-apps/image/deploying-with-git/overview Guides for managing applications on the Aptible platform, covering creation, scaling, configuration variables, deployment strategies (CI/CD, Docker, Git), and autoscaling. ```markdown ## App Guides Overview - How to create an app - How to scale apps and services - How to set and modify configuration variables - How to deploy to Aptible with CI/CD - How to use AWS Secrets Manager with Aptible Apps - How to define services - How to deploy via Docker Image - How to deploy from Git - How to migrate from deploying via Docker Image to deploying via Git - Horizontal Autoscaling Guide ``` -------------------------------- ### MongoDB Atlas Documentation Link Source: https://www.mongodb.com/docs/manual/reference/command/setFeatureCompatibilityVersion/ Link to the official documentation for MongoDB Atlas, guiding users on getting started with the service. ```link https://www.mongodb.com/docs/atlas/ ``` -------------------------------- ### MongoDB Atlas Documentation Link Source: https://www.mongodb.com/docs/manual/administration/production-notes/ Link to the official documentation for MongoDB Atlas, guiding users on getting started with the service. ```link https://www.mongodb.com/docs/atlas/ ``` -------------------------------- ### Observability Guides: Set up Application Performance Monitoring Source: https://www.aptible.com/docs/how-to-guides/app-guides/expose-web-app-to-internet Learn how to set up application performance monitoring. ```markdown ## How to set up application performance monitoring Learn how to set up application performance monitoring. ``` -------------------------------- ### MongoDB Atlas Documentation Link Source: https://docs.mongodb.com/v4.2/reference/connection-string/ Link to the official documentation for MongoDB Atlas, guiding users on getting started with the service. ```link https://www.mongodb.com/docs/atlas/ ``` -------------------------------- ### MongoDB Atlas Documentation Link Source: https://docs.mongodb.com/manual/core/replica-set-architectures/ Link to the official documentation for MongoDB Atlas, guiding users on getting started with the service. ```link https://www.mongodb.com/docs/atlas/ ``` -------------------------------- ### Deploy Starter Templates Source: https://www.aptible.com/docs/how-to-guides/observability-guides/elasticsearch-log-rotation Guides for deploying pre-configured starter templates for popular web frameworks on Aptible. These templates simplify the initial setup process. ```en Ruby on Rails - Starter Template: Deploy a starter template Ruby on Rails app on Aptible Node.js + Express - Starter Template: Deploy a starter template Node.js app using the Express framework on Aptible Python + Django - Starter Template: Deploy a starter template Python app using the Django framework on Aptible PHP + Laravel - Starter Template: Deploy a starter template PHP app using the Laravel framework on Aptible Python + Flask - Demo App: Deploy our Python demo app using the Flask framework with Managed PostgreSQL Database and Redis instance ``` -------------------------------- ### Aptible App Guides Source: https://www.aptible.com/docs/dockerfile-deploy Guides for managing applications on the Aptible platform, covering creation, scaling, configuration variables, deployment strategies (CI/CD, Docker, Git), and autoscaling. ```markdown ## App Guides Overview - How to create an app - How to scale apps and services - How to set and modify configuration variables - How to deploy to Aptible with CI/CD - How to use AWS Secrets Manager with Aptible Apps - How to define services - How to deploy via Docker Image - How to deploy from Git - How to migrate from deploying via Docker Image to deploying via Git - Horizontal Autoscaling Guide ``` -------------------------------- ### MongoDB Atlas Documentation Link Source: https://docs.mongodb.com/manual/reference/read-concern/ Link to the official documentation for MongoDB Atlas, guiding users on getting started with the service. ```link https://www.mongodb.com/docs/atlas/ ``` -------------------------------- ### Deploy Starter Templates Source: https://www.aptible.com/docs/how-to-guides/app-guides/use-domain-apex-with-endpoints/domain-apex-redirect Guides for deploying pre-configured starter templates for various popular frameworks on Aptible. Includes Ruby on Rails, Node.js + Express, Python + Django, PHP + Laravel, and Python + Flask. ```documentation Deploy a starter template Overview Ruby on Rails - Starter Template Deploy a starter template Ruby on Rails app on Aptible Node.js + Express - Starter Template Deploy a starter template Node.js app using the Express framework on Aptible Python + Django - Starter Template Deploy a starter template Python app using the Django framework on Aptible PHP + Laravel - Starter Template Deploy a starter template PHP app using the Laravel framework on Aptible Python + Flask - Demo App Deploy our Python demo app using the Flask framework with Managed PostgreSQL Database and Redis instance ``` -------------------------------- ### MongoDB Atlas Documentation Link Source: https://docs.mongodb.com/manual/reference/connection-string/ Link to the official documentation for MongoDB Atlas, guiding users on getting started with the service. ```link https://www.mongodb.com/docs/atlas/ ``` -------------------------------- ### Deploy Starter Templates Source: https://www.aptible.com/docs/reference/aptible-cli/cli-commands/cli-metric-drain-create-datadog Guides for deploying starter templates across various popular web frameworks. This section covers the initial setup and deployment process for applications built with these technologies. ```ruby getting-started/deploy-starter-template/ruby-on-rails ``` ```node.js getting-started/deploy-starter-template/node-js ``` ```python getting-started/deploy-starter-template/python-django ``` ```php getting-started/deploy-starter-template/php-laravel ``` ```python getting-started/deploy-starter-template/python-flask ``` -------------------------------- ### MongoDB Atlas Documentation Link Source: https://docs.mongodb.com/manual/reference/write-concern/ Link to the official documentation for MongoDB Atlas, guiding users on getting started with the service. ```link https://www.mongodb.com/docs/atlas/ ``` -------------------------------- ### MongoDB Atlas Documentation Link Source: https://docs.mongodb.com/v4.2/core/replica-set-members/ Link to the official documentation for MongoDB Atlas, guiding users on getting started with the service. ```link https://www.mongodb.com/docs/atlas/ ``` -------------------------------- ### MongoDB Atlas Documentation Link Source: https://docs.mongodb.com/manual/faq/storage/ Link to the official documentation for MongoDB Atlas, guiding users on getting started with the service. ```link https://www.mongodb.com/docs/atlas/ ``` -------------------------------- ### Aptible CLI - Overview Source: https://www.aptible.com/docs/getting-started/deploy-starter-template/overview Provides an overview of how to use the Aptible CLI for managing your Aptible resources. This section covers general usage patterns and setup. ```APIDOC Aptible CLI Overview: This section details the general usage and setup for the Aptible CLI. It serves as a starting point for interacting with Aptible services via the command line. Refer to specific command groups for detailed syntax and options. ``` -------------------------------- ### MongoDB Atlas Documentation Link Source: https://docs.mongodb.com/manual/core/journaling/ Link to the official documentation for MongoDB Atlas, guiding users on getting started with the service. ```link https://www.mongodb.com/docs/atlas/ ``` -------------------------------- ### Deploy Starter Template: Ruby on Rails Source: https://www.aptible.com/docs/core-concepts/managed-databases/connecting-databases/database-endpoints Guide for deploying a Ruby on Rails application using Aptible's starter template. Covers initial setup and deployment steps. ```ruby getting-started/deploy-starter-template/ruby-on-rails ```