<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Deploy Friday - Medium]]></title>
        <description><![CDATA[Your ultimate knowledge source for everything platform-as-a-service (PaaS) and open source. Delve into tutorials, how-to’s, and deep-dive insights, and empower yourself and your deployments with knowledge. - Medium]]></description>
        <link>https://medium.com/deploy-friday?source=rss----5c7d61eeb0b6---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Deploy Friday - Medium</title>
            <link>https://medium.com/deploy-friday?source=rss----5c7d61eeb0b6---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 21:55:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/deploy-friday" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Best Netlify alternatives for your next project]]></title>
            <link>https://medium.com/deploy-friday/best-netlify-alternatives-for-your-next-project-aee0c1e00067?source=rss----5c7d61eeb0b6---4</link>
            <guid isPermaLink="false">https://medium.com/p/aee0c1e00067</guid>
            <category><![CDATA[platform-as-a-service]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Zohar Stolar]]></dc:creator>
            <pubDate>Mon, 05 Aug 2024 10:08:54 GMT</pubDate>
            <atom:updated>2024-08-06T08:12:00.319Z</atom:updated>
            <content:encoded><![CDATA[<p>Netlify may be a household name in computing solutions, but it’s not the best choice for every business. Its infrastructure, pricing plans, and feature limitations might be too restrictive for some projects or developers’ preferences.</p><p>So let’s look closely at what to expect from Netlify, how popular alternatives stack up, and how to decide which platform is best for your cloud computing needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IIQ4NGOJN2P6ES9GevRplg.jpeg" /><figcaption><em>Compare Netlify, Upsun, and Vercel for your ultimate Platform-as-a-Service (PaaS)</em></figcaption></figure><h3>Comparing cloud infrastructure platforms for deploying mobile and web applications, static sites, and more</h3><p>It’s overwhelming to compare every detail across a huge number of platforms; that’s why we’re sharing a concise and direct comparison of each service. We’ll pit Netlify against 2 of the most worthy cloud computing alternatives, examining:</p><ul><li><strong>Available features:</strong> Comprehensive list of popular or notable features for each platform.</li><li><strong>Available services:</strong> Not integrations — managed services. We include whether they’re 3rd party (requiring multiple subscriptions and contracts).</li><li><strong>Workloads supported: </strong>The ability to support your preferred developer tools and code languages could make or break your choice of platform.</li><li><strong>Cloud host providers: </strong>Who hosts each platform and what are the cloud options for end users?</li><li><strong>Available geographies: </strong>From sustainability to availability, you should know where your platform’s servers are located and where your work will be deployed.</li><li><strong>Security and compliance: </strong>Which tools meet the regulatory requirements for your industry when building apps, web pages, and more? How secure are they compared to alternatives?</li><li><strong>Continuous integration/continuous deployment (CI/CD): </strong>Automated continuous deployment saves time, enabling your team to focus on iterative improvements.</li><li><strong>Build time restrictions:</strong> Build limitations on your website or app can be time-consuming and costly, so you need to know upfront how each platform handles this. And when it comes to request timeouts, even a difference of a few seconds matters.</li><li><strong>Commitment to sustainability: </strong>By 2040, data centers may account for 14% of global greenhouse gas emissions (<a href="https://www.researchgate.net/publication/378597789_Impact_of_Data_Centers_on_Power_Consumption_Climate_Change_and_Sustainability#:~:text=By%202040%2C%20digital%20data%20storage,consumption%20doubling%20every%20four%20years.">ResearchGate</a>). That’s why it’s critical to know where your provider stands on sustainability.</li><li><strong>Service tiers: </strong>What does scaling up from a free tier look like? Which features and functionality limitations come with each level of service?</li></ul><h3>Netlify and alternatives at a glance</h3><p>We’ll start with a full rundown of each platform, and then share a condensed table to compare these tools directly.</p><h3>Netlify</h3><p><a href="https://www.netlify.com/">Netlify</a> is a front-end platform living on the edge, literally. They serve static files directly at the edge without tapping servers. On the surface, that makes Netlify a decent choice to build and deploy static web projects — but there’s a lot more you should know.</p><p><strong>Available features:</strong> Webhooks build triggers, Git-based deployments, global content delivery network (CDN), data unification, preview environments, visual editor asset optimization, collaboration, and atomic deployment, with add-ons for server-side analytics and metrics, customizable functions deployable as Application Programming Interface (API) endpoints, and code-free forms and submissions.</p><p><strong>Available services:</strong> No managed services; you’ll have to integrate with other tools for data storage, large media management, search, and more.</p><p><strong>Workloads supported: </strong>Full stack, edge functions, internet/web services, APIs, static sites, and background workers.</p><p><strong>Cloud host providers: </strong>Netlify runs on Amazon Web Services (AWS).</p><p><strong>Available geographies: </strong>Netlify features 70+ points of presence (POPs) globally and can deploy in 15 regions across 5 continents. Users can self-select deployments in:</p><ul><li><strong>Asia Pacific (APAC):</strong> Tokyo, Singapore, Sydney</li><li><strong>North America:</strong> Central Canada, North Virginia, Ohio, North California, Oregon</li><li><strong>South America:</strong> São Paulo</li><li><strong>Europe:</strong> Ireland, London, and Frankfurt; Stockholm, Paris, and Milan available through support</li></ul><p><strong>Security and compliance: </strong>Active distributed denial-of-service (DDoS) mitigation, secure code encryption, penetration testing, compliance data centers, free HTTPS certificates, single sign-on (SSO), and two-factor authentication (2FA). Compliant with:</p><ul><li>System and Organization Controls 2 Type 2 (SOC 2)</li><li>Information Security Management 27001 (ISO 27001)</li><li>General Data Protection Regulation (GDPR)</li><li>California Consumer Privacy Act (CCPA)</li><li>Payment card industry self-assessment questionnaire (PCI for SAQ-A) requirements</li></ul><p><strong>CI/CD: </strong>Automatic deployment with Git hooks, command-line interface (CLI), and API.</p><p><strong>Build time restrictions:</strong> Starter 300 minutes/month, Pro 25,000 minutes/month, Enterprise custom. You can buy extra build minute packs, but minutes expire each month with no rollover. You’ll hit request timeouts at 10–26 seconds, depending on your tier.</p><p><strong>Commitment to sustainability: </strong>Netlify doesn’t have its own sustainability initiative, deferring to its cloud providers’ sustainability policies.</p><p><strong>Service tiers: </strong>Free Tier is single-member, 1 concurrent build, 500 projects, 100GB bandwidth, and 300 minutes/month. Pro Tier offers up to 3 concurrent builds, 500 projects, 1TB bandwidth, and 25,000 minutes/month. Enterprise plans are customized.</p><h3>Upsun</h3><p><a href="https://upsun.com/">Upsun</a> is a highly customizable Platform-as-a-Service (PaaS) prioritizing ease of use, flexibility, and sustainability. Choose your repository options, then customize your project details with composable infrastructure. This customization makes Upsun one of the best Netlify alternatives: a well-rounded choice to deploy websites, apps, or any cloud computing project.</p><p><strong>Available features:</strong> Built-in edge layer, 99.99% high availability, automatic scaling, persistent storage, no request timeout, exact preview environments that perfectly mimic production, instant provisioning, collaboration, complementary cron jobs, fine-tuned access controls, fast support response times, zero configuration, and Blackfire observability.</p><p><strong>Available services:</strong> Upsun prioritizes in-house managed features.</p><ul><li><strong>Data and object storage (internal): </strong>Managed InfluxDB, Kafka, MariaDB/MySQL, Memcached, MongoDB, Network Storage, Oracle MySQL, PostgreSQL, Redis</li><li><strong>Search (internal): </strong>Elasticsearch, OpenSearch, Solr</li><li><strong>Other (internal):</strong> Headless Chrome, RabbitMQ, Varnish, Vault KMS</li></ul><p><strong>Workloads supported: </strong>Full stack, databases, web services, APIs, static sites, and background workers.</p><p><strong>Cloud host providers: </strong>Multiple available regions and data centers with renewable energy sources — users choose from AWS, Google Cloud, Microsoft Azure, Orange, or OVHcloud.</p><p><strong>Available geographies: </strong>17 regions, 3 continents, 5 cloud options. Choose your site and cloud to deploy:</p><ul><li><strong>APAC: </strong>Sydney (AWS, Microsoft Azure)</li><li><strong>North America: </strong>Central Washington (Azure), South Carolina (Google, 2 AWS regions), Montreal (AWS)</li><li><strong>Europe: </strong>Stockholm (AWS), London (Google), Paris (OVHCloud, Azure, Orange), Frankfurt (Google), Dublin (3 AWS regions), Zurich (Google)</li><li>Enterprise clients can access 60+ POPs globally with managed CDNs.</li></ul><p><strong>Security and compliance: </strong>Advanced project isolation, carriage return and line feed (CRLF) injection blocking with Upsun Web Application Firewall (WAF), request smuggling header injection, response splitting, HTTP protocol enforcement, and built-in reverse proxy cache configuration for secure DDoS protection. Gaia-X member. Compliant with:</p><ul><li>SOC 2 Type 2</li><li>GDPR</li><li>Canada’s Anti-Spam Legislation (CASL)</li><li>Germany’s Federal Data Protection Act (BDSG)</li><li>Personal Information Protection and Electronic Documents Act (PIPEDA)</li><li>Australian Privacy Act (APA)</li><li>Payment Card Industry Data Security Standard (PCI DSS) Level 1</li></ul><p><strong>CI/CD: </strong>Automatic deployment with Git hooks, CLI, API, and source operations (automated code updates).</p><p><strong>Build time restrictions:</strong> No build time limits and no request timeouts — a major speed and performance advantage over other providers.</p><p><strong>Commitment to sustainability: </strong>Upsun stands out here, too: sustainability is one of their core values. This provider offers 12x better CPU usage vs. Amazon Web Services Elastic Compute Cloud (AWS EC2). There’s even a 3% discount on resource usage when deployed to select green regions with data centers and servers powered by renewable energy.</p><p><strong>Service tiers: </strong>Free Trial features unlimited users, 1 build, 2 environments, and 4.5 CPUs/12GB memory/20GB storage running concurrently. There are no fixed service tiers at Upsun. Instead, customize your plan with unlimited options using a transparent pricing calculator and only pay for the resources you use. Manage from your dashboard anytime. Everyone gets enterprise-ready service-level agreement (SLA), compliance, security, and access controls.</p><h3>Vercel</h3><p><a href="https://vercel.com/">Vercel</a> is a cloud hosting platform to create, store, and deploy front-end frameworks and static sites. It’s optimized for Next.js and is a good option for developers choosing this framework, but it may not be the ideal solution for full-stack. Vercel offers managed databases, storage, and other options like analytics — but it relies on 3rd-party tools, which can be a hassle for enterprise-level projects.</p><p><strong>Available features:</strong> Automated builds, build hooks, simple rollbacks, global CDN, visual editing, Edge Network, instant rollbacks, collaboration, preview environments, and frontend observability.</p><p><strong>Available services:</strong> Vercel uses 3rd-party tools for storage and other services.</p><ul><li><strong>Data and object storage (3rd party via Upstash):</strong> Managed PostgreSQL (Vercel Postgres), Redis (Vercel KV), Kafka</li><li>Use Vercel Blob for large file storage, Edge Config for low-latency global storage</li><li>3rd-party integration options for other services and features (analytics, search, etc.)</li></ul><p><strong>Workloads supported: </strong>Mainly supports Next.js and other Javascript frameworks, along with Edge functions and static websites.</p><p><strong>Cloud host providers: </strong>Vercel Edge Network runs on AWS.</p><p><strong>Available geographies: </strong>18 regions, 6 continents, 1 IaaS option. Choose your site to deploy:</p><ul><li><strong>APAC:</strong> Mumbai, Hong Kong, Tokyo, Seoul, Osaka, Singapore, Sydney</li><li><strong>North America:</strong> Cleveland, Washington DC, Portland Oregon, San Francisco</li><li><strong>South America: </strong>São Paulo</li><li><strong>Europe:</strong> Stockholm, Paris, Dublin, Frankfurt, London</li><li><strong>Africa:</strong> Cape Town</li><li>Access 100+ POPs globally</li></ul><p><strong>Security and compliance: </strong>Hourly backups, Advanced Encryption Standard 256 (AES-256) and HTTPS Transport Layer Security (HTTPS/TLS) 1.3 data encryption, region-based failover and resiliency testing, enterprise infrastructure isolation. Compliant with:</p><ul><li>SOC 2 Type 2</li><li>ISO 27001:2013</li><li>GDPR</li><li>PCI DSS</li><li>HIPAA</li><li>EU-US Data Privacy Framework</li></ul><p><strong>CI/CD: </strong>Automatic deployment with Git hooks, CLI, and API.</p><p><strong>Build time restrictions:</strong> Free Tier is 6,000 minutes/month, Pro Tier is 24,000 minutes/month, Enterprise custom. You get 45 minutes per deployment, with request timeouts at 30 seconds.</p><p><strong>Commitment to sustainability: </strong>Vercel doesn’t have its own sustainability initiative, deferring to its cloud providers’ sustainability policies.</p><p><strong>Service tiers: </strong>Free (Hobby) is single member, 1 concurrent build, 200 projects, 100GB bandwidth, and 6,000 minutes/month. Pro is up to 12 concurrent builds, unlimited projects, 1TB bandwidth, and 24,000 minutes/month. Enterprise offers unlimited projects with custom options.</p><h3>Netlify alternatives comparison table</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fairtable.com%2Fembed%2FappGxgiwUWkSWTrYz%2FshrFOvDj1CImXSzZ2&amp;display_name=Airtable&amp;url=https%3A%2F%2Fairtable.com%2FappGxgiwUWkSWTrYz%2FshrFOvDj1CImXSzZ2&amp;image=https%3A%2F%2Fstatic.airtable.com%2Fimages%2Foembed%2Fairtable.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=airtable" width="800" height="533" frameborder="0" scrolling="no"><a href="https://medium.com/media/4c3197fc03ba513562a9f6db160df049/href">https://medium.com/media/4c3197fc03ba513562a9f6db160df049/href</a></iframe><p>With so much to consider when looking for Netlify alternatives, it’s easy for businesses to lose sight of what’s most important. But if you’re looking for user-friendly flexibility with fewer limitations, more transparency, and a commitment to sustainability, give<a href="https://upsun.com/"> Upsun</a> a try.</p><p>Which feature, detail, or quality is a non-negotiable for you when choosing PaaS tools? Leave a comment with your thoughts.</p><p><strong>Sources: </strong><a href="https://www.netlify.com/">Netlify</a>, <a href="https://platform.sh/">Platform.sh</a>, <a href="http://www.upsun.com/">Upsun</a>, <a href="https://vercel.com/">Vercel</a>, <a href="https://aws.amazon.com/">AWS</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aee0c1e00067" width="1" height="1" alt=""><hr><p><a href="https://medium.com/deploy-friday/best-netlify-alternatives-for-your-next-project-aee0c1e00067">Best Netlify alternatives for your next project</a> was originally published in <a href="https://medium.com/deploy-friday">Deploy Friday</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Platform.sh and Upsun outshine Managed Kubernetes solutions]]></title>
            <link>https://medium.com/deploy-friday/why-platform-sh-and-upsun-outshine-managed-kubernetes-solutions-550e4bbf7143?source=rss----5c7d61eeb0b6---4</link>
            <guid isPermaLink="false">https://medium.com/p/550e4bbf7143</guid>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[paas]]></category>
            <dc:creator><![CDATA[Vinnie Russo]]></dc:creator>
            <pubDate>Mon, 27 May 2024 14:49:03 GMT</pubDate>
            <atom:updated>2024-05-27T14:49:02.955Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s whirlwind world of cloud computing, choosing the right platform for your development and deployment needs is like picking the perfect tool from a well-stocked toolbox. Kubernetes has certainly made a splash, becoming the go-to choice for container orchestration. But let’s be honest, managing Kubernetes can feel like taming a wild beast. Enter Platform.sh and its latest gem, Upsun. These two offer a fresh, user-friendly alternative to managed Kubernetes solutions. Let’s dive into why Platform.sh and Upsun are the rockstars your team needs, and how they stack up against heavyweights like Amazon EKS, Google GKE, Azure AKS, SuSE Rancher, and RedHat OpenShift.</p><h3>Simplified management and operations</h3><p>Platform.sh is like having a personal assistant for your infrastructure. It’s a fully managed Platform-as-a-Service (PaaS) that takes care of the nitty-gritty, so you can focus on what you do best: building and deploying killer apps. No more sleepless nights worrying about hardware, networking, or maintenance.</p><p>Contrast this with Managed Kubernetes solutions like Amazon EKS, Google GKE, Azure AKS, SuSE Rancher, and RedHat OpenShift. While they handle some infrastructure management, you’re still left juggling setup, CI/CD pipelines, storage management, and security configurations. It’s like being handed a Swiss Army knife when all you needed was a simple screwdriver.</p><p>Upsun takes fully managed application management even further with explicit resource allocation for each component, allowing independent scaling and efficient resource usage. This is a game-changer for projects involving decoupled and composable architectures. More on this trend? Check out <a href="https://www.gartner.com/smarterwithgartner/the-future-of-applications-is-composable">Gartner’s take on composable applications</a>.</p><h3>Enhanced security and compliance</h3><p>In today’s digital battleground, security is non-negotiable. Both Platform.sh and Upsun come armed with built-in security features and compliance with standards like SOC 2, PCI DSS Level 1, and HIPAA. Automated TLS certificates, DDoS protection, multifactor authentication, and a read-only file system are just the tip of the iceberg.</p><p>Managed Kubernetes solutions offer robust security as well, but require you to roll up your sleeves. Configuring network policies, managing secrets, and ensuring secure access fall squarely on your shoulders. It’s a lot of heavy lifting, especially if you don’t have a dedicated DevOps team. For a deeper dive in this topic, <a href="https://www.cncf.io/">see how the Cloud Native Computing Foundation addresses these complexities</a>.</p><h3>Resource efficiency and sustainability</h3><p>Platform.sh and Upsun are designed with your wallet and the planet in mind. Upsun’s usage-based pricing means you only pay for what you use — no more, no less. Plus, you get a 3% discount for deploying to low-carbon data centers to encourage greener hosting. Read more about sustainable cloud computing in <a href="https://www.techrepublic.com/article/how-sustainable-is-your-cloud/">this insightful article by TechRepublic</a>.</p><p>On the flip side, Managed Kubernetes solutions like Amazon EKS, Google GKE, and Azure AKS can lead to higher costs. The need for additional tools, resources, and continuous maintenance can quickly inflate your budget.</p><h3>Developer experience and flexibility</h3><p>Platform.sh supports a wide array of development stacks — PHP, Node.js, Python, you name it. Its Git-driven architecture ensures every infrastructure change is versioned and auditable. It’s like having a safety net that lets you swing higher.</p><p>Upsun ups the ante with features like unlimited preview environments, detailed application performance management, and flexible resource allocation. This kind of flexibility is ideal for teams handling dynamic, complex applications.</p><p>Managed Kubernetes solutions offer flexibility but come with a steep learning curve. Setting up CI/CD pipelines, managing secrets, and configuring network policies are tasks that require significant expertise. If you’re curious about the learning curve, <a href="https://www.redhat.com/en/topics/containers/what-is-kubernetes">Red Hat’s guide to Kubernetes</a> is a good place to start.</p><h3>When Managed Kubernetes solutions make sense</h3><p>Let’s keep it real, there are times when Managed Kubernetes solutions are the right call. For example, if your organization has highly specialized infrastructure needs or requires extensive customization, platforms like SuSE Rancher and RedHat OpenShift might be your best bet. These platforms offer comprehensive tools for enterprise-grade deployments, including advanced monitoring, logging, and security features, which can be hugely useful for certain applications.</p><p>Companies with a strong DevOps culture and the expertise to manage Kubernetes clusters may also find Managed Kubernetes solutions more aligned with their operational models. The ability to integrate deeply with existing workflows and third-party tools can be a significant advantage.</p><h3>Notable names in the Managed Kubernetes market</h3><p>Here’s a quick rundown of some big players:</p><ul><li><strong>Amazon Elastic Kubernetes Service (EKS)</strong>: great for running Kubernetes on AWS, but requires significant setup and integration with other AWS services. Managing EKS can be complex and time-consuming.</li><li><strong>Google Kubernetes Engine (GKE)</strong>: robust and scalable, but users still need to handle networking, security, and other infrastructure components.</li><li><strong>Azure Kubernetes Service (AKS)</strong>: offers a Managed Kubernetes service on Microsoft Azure, but requires substantial setup and integration with other Azure services.</li><li><strong>SuSE Rancher</strong>: simplifies deploying and managing Kubernetes clusters with powerful multi-cluster management capabilities.</li><li><strong>RedHat OpenShift</strong>: an enterprise Kubernetes platform with developer and operational tools for managing hybrid cloud and multi-cloud deployments.</li></ul><h3>An alternative to Managed Kubernetes</h3><p>Platform.sh and Upsun offer a streamlined, efficient, and secure alternative to Managed Kubernetes solutions. They abstract away the complexities of infrastructure management, provide robust security and compliance features, and promote resource efficiency and sustainability. This allows development teams to focus on what they do best: building and deploying innovative applications.</p><p>However, Managed Kubernetes solutions like Amazon EKS, Google GKE, Azure AKS, SuSE Rancher, and RedHat OpenShift have their place — particularly for organizations with specialized infrastructure needs and strong DevOps capabilities. The choice ultimately depends on your specific requirements and resources.</p><p>For organizations looking to reduce complexity, improve time to market, and achieve cost efficiency, Platform.sh and Upsun are clear winners. Embrace the future of cloud development with Platform.sh and Upsun, and experience the benefits of a truly developer-focused platform.</p><p>For more information, visit <a href="http://platform.sh/">Platform.sh</a> and <a href="https://upsun.com/">Upsun</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=550e4bbf7143" width="1" height="1" alt=""><hr><p><a href="https://medium.com/deploy-friday/why-platform-sh-and-upsun-outshine-managed-kubernetes-solutions-550e4bbf7143">Why Platform.sh and Upsun outshine Managed Kubernetes solutions</a> was originally published in <a href="https://medium.com/deploy-friday">Deploy Friday</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying Laravel with Horizon on Upsun]]></title>
            <link>https://medium.com/deploy-friday/deploying-laravel-with-horizon-on-upsun-5b543db39c1c?source=rss----5c7d61eeb0b6---4</link>
            <guid isPermaLink="false">https://medium.com/p/5b543db39c1c</guid>
            <category><![CDATA[upsun]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[paas]]></category>
            <dc:creator><![CDATA[Guillaume Moigneu]]></dc:creator>
            <pubDate>Tue, 21 May 2024 09:38:42 GMT</pubDate>
            <atom:updated>2024-02-28T16:07:40.646Z</atom:updated>
            <content:encoded><![CDATA[<p>We will rely on the terminal and the Upsun CLI to deploy our application. Our end-goal is to deploy our application with a real production domain at the end.</p><p>Let’s review the steps we will have to go through:</p><ul><li>Create a new Upsun project</li><li>Generating the base Upsun configuration for our Laravel app</li><li>Configuring our base connection to services</li><li>Setting up our environment variables</li><li>Do our first deploy</li><li>Setting up Laravel Horizon to handle our queues</li><li>Configuring our domain</li></ul><h3>Create a new Upsun project</h3><p>Launch your terminal and make sure you have the Upsun CLI available. You can refer to <a href="https://docs.upsun.com/administration/cli.html#1-install">this page on the documentation to install the CLI tool</a>.</p><p>cd into your Laravel application base directory and start by logging in with upsun login. Go through the web-based authentication process.</p><pre>upsun login<br>Opened URL: http://127.0.0.1:5001<br>Please use the browser to log in.<br><br>Help:<br>  Leave this command running during login.<br>  If you need to quit, use Ctrl+C.<br><br>Login information received. Verifying...<br>You are logged in.<br><br>Generating SSH certificate...<br>A new SSH certificate has been generated.<br>It will be automatically refreshed when necessary.<br><br>Username: ---<br>Email address: guillaume.moigneu@platform.sh</pre><p>Once done, we will create a new empty project with upsun project:create. Follow the prompts:</p><pre>upsun project:create<br>Creating a project under the organization Nls (nls)<br><br>* Project title (--title)<br>Default: Untitled Project<br>&gt; Wooply.co</pre><p>Select the best region for hosting your project. Note that the regions generating less than 100 gC02eq/kWh are considered green and will benefit from an automated discount on resources.</p><pre>* Region (--region)<br>The region where the project will be hosted.<br>Get a 3% discount on resources for regions with a carbon intensity of less than 100 gCO2eq/kWh.<br>  [au.platform.sh  ] Sydney, Australia (AWS)  [545 gC02eq/kWh]<br>  [au-2.platform.sh] Sydney, Australia (AZURE)  [545 gC02eq/kWh]<br>  [ca-1.platform.sh] Montreal, Canada (AWS)  [31 gC02eq/kWh]<br>  [ch-1.platform.sh] Zurich, Switzerland (GCP)  [91 gC02eq/kWh]<br>  [de-2.platform.sh] Frankfurt, Germany (GCP)  [416 gC02eq/kWh]<br>  [eu.platform.sh  ] Dublin, Ireland (AWS)  [386 gC02eq/kWh]<br>  [eu-2.platform.sh] Dublin, Ireland (AWS)  [386 gC02eq/kWh]<br>  [eu-4.platform.sh] Dublin, Ireland (AWS)  [386 gC02eq/kWh]<br>  [eu-5.platform.sh] Stockholm, Sweden (AWS)  [23 gC02eq/kWh]<br>  [fr-3.platform.sh] Gravelines, France (OVH)  [59 gC02eq/kWh]<br>  [fr-4.platform.sh] Paris, France (AZURE)  [59 gC02eq/kWh]<br>  [uk-1.platform.sh] London, United Kingdom (GCP)  [200 gC02eq/kWh]<br>  [us.platform.sh  ] Washington, United States (AWS)  [396 gC02eq/kWh]<br>  [us-2.platform.sh] Washington, United States (AWS)  [396 gC02eq/kWh]<br>  [us-3.platform.sh] Moses Lake, United States (AZURE)  [56 gC02eq/kWh]<br>  [us-4.platform.sh] Charleston, United States (GCP)  [647 gC02eq/kWh]<br>&gt; us-3.platform.sh</pre><p>The CLI will auto-detect your git repository and will add the Upsun endpoint as a new remote for your repository:</p><pre>Default branch (--default-branch)<br>The default Git branch name for the project (the production environment)<br>Default: main<br>&gt; main<br><br>Git repository detected: /Users/nls/projects/woop.ly/wooply.co<br>Set the new project Wooply.co as the remote for this repository? [Y/n]</pre><p>The Upsun platform will now take a minute to provision your project:</p><pre>The Upsun Bot is activating your project<br><br>      ▄     ▄<br>      ▄█▄▄▄█▄<br>    ▄██▄███▄██▄<br>    █ █▀▀▀▀▀█ █<br>       ▀▀ ▀▀<br><br>The project is now ready!<br>snacckbxx5cee<br><br>  Region: us-3.platform.sh<br>  Project ID: snacckbxx5cee<br>  Project title: Wooply.co<br>  URL: https://console.upsun.com/01hd1s2bjt44369c0923a70g44/snacckbxx5cee<br>  Git URL: snacckbxx5cee@git.us-3.platform.sh:snacckbxx5cee.git<br><br>Setting the remote project for this repository to: Wooply.co (snacckbxx5cee)</pre><p>Let’s move on to creating the configuration.</p><h3>Generating the base Upsun configuration for our Laravel app</h3><p>The Upsun CLI comes bundled with our nifty upsun ify command that will auto-generate a base configuration based on the runtime and framework you are using.</p><p>Let’s launch it in our Laravel directory:</p><pre>upsun ify<br>Welcome to Upsun!<br>Let&#39;s get started with a few questions.<br><br>We need to know a bit more about your project. This will only take a minute!<br><br>✓ Detected stack: Laravel<br>✓ Detected runtime: PHP<br>✓ Detected dependency managers: Composer, Npm<br>Tell us your project&#39;s application name: [wooply]</pre><p>upsun ify detects a Laravel app and automatically setup the configuration for PHP, composer and npm. We now need to tell Upsun which services we are running. Just select in the list the services the app relies on. In our case, we will elect PostgreSQL and Redis:</p><pre>                       (\_/)<br>We’re almost done...  =(^.^)=<br><br>Last but not least, unless you’re creating a static website, your project uses services. Let’s define them:<br><br>Select all the services you are using:<br>Use arrows to move, space to select, type to filter<br>&gt; [ ]  MariaDB<br>  [ ]  MySQL<br>  [x]  PostgreSQL<br>  [x]  Redis<br>  [ ]  Redis Persistent<br>  [ ]  Memcached<br>  [ ]  OpenSearch</pre><p>If your application needs to handle local files on the filesystem, it is recommended to add Network Storage as this will allow multiple instances of the application or a worker (horizon) to access the files as well.</p><pre>┌───────────────────────────────────────────────────┐<br>│   CONGRATULATIONS!                                │<br>│                                                   │<br>│   We have created the following files for your:   │<br>│     - .environment                                │<br>│     - .upsun/config.yaml                          │<br>│                                                   │<br>│   We’re jumping for joy! ⍢                        │<br>└───────────────────────────────────────────────────┘<br>         │ /<br>         │/<br>         │<br>  (\ /)<br>  ( . .)<br>  o (_(“)(“)<br><br>You can now deploy your application to Upsun!<br>To do so, commit your files and deploy your application using the Upsun CLI:<br>  $ git add .<br>  $ git commit -m &#39;Add Upsun configuration files&#39;<br>  $ upsun project:set-remote<br>  $ upsun push</pre><p>The configuration is now generated. Let’s follow the directions and commit it:</p><pre>git add .<br>git commit -m &#39;Add Upsun configuration files&#39;<br>[main 953816a] Add Upsun configuration files<br> 2 files changed, 193 insertions(+)<br> create mode 100644 .environment<br> create mode 100644 .upsun/config.yaml</pre><h3>Configuring the application to access the services</h3><p>In order for our Laravel application to connect to our services, we need to inject the proper configuration.</p><p>First add the redis and pdo_pgsql extensions to .upsun/config.yaml if needed:</p><pre>applications:  <br>  YOUR_APP_NAME:<br>    [...]<br>    runtime:  <br>      extensions:  <br>        - redis<br>        - pdo_pgsql<br> [...]</pre><p>Add the change to the git index and commit:</p><pre>git add .upsun/config.yaml<br>git commit -m &#39;Add redis php extension&#39;</pre><p>We will now look at the .environment file that auto-generates some variables for our app. The upsun ify command should have added the necessary variable declarations for Laravel. This file maps default Upsun environment variables to the ones needed by Laravel. You can adjust this file if needed or add additional mappings like we have done here with the email settings:</p><pre># Set database environment variables  <br>export DB_HOST=&quot;$POSTGRESQL_HOST&quot;  <br>export DB_PORT=&quot;$POSTGRESQL_PORT&quot;  <br>export DB_PATH=&quot;$POSTGRESQL_PATH&quot;  <br>export DB_USERNAME=&quot;$POSTGRESQL_USERNAME&quot;  <br>export DB_PASSWORD=&quot;$POSTGRESQL_PASSWORD&quot;  <br>export DB_SCHEME=&quot;$POSTGRESQL_SCHEME&quot;  <br>export DATABASE_URL=&quot;${DB_SCHEME}://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_PATH}&quot;  <br>  <br># Set Laravel-specific environment variables  <br>export DB_CONNECTION=&quot;$DB_SCHEME&quot;  <br>export DB_DATABASE=&quot;$DB_PATH&quot;  <br>  <br># Set Cache environment variables  <br>export CACHE_HOST=&quot;$REDIS_HOST&quot;  <br>export CACHE_PORT=&quot;$REDIS_PORT&quot;  <br>export CACHE_SCHEME=&quot;$REDIS_SCHEME&quot;  <br>export CACHE_URL=&quot;${CACHE_SCHEME}://${CACHE_HOST}:${CACHE_PORT}&quot;  <br>  <br># Set Redis environment variables  <br>export REDIS_URL=&quot;$CACHE_URL&quot;<br><br># Email<br>export MAIL_MAILER=&quot;smtp&quot;  <br>export MAIL_HOST=&quot;${PLATFORM_SMTP_HOST}&quot;  <br>export MAIL_PORT=&quot;25&quot;</pre><p>Last step before deploying our app, we need to inject our remaining configuration through dynamic environment variables.</p><h3>Setting dynamic environment variables</h3><p>Open your local .env file. As Upsun already handle the specific services (database, cache, queues) settings, we only need to setup the global configuration. Here are the ones we need for our Wooply project. Note that we use the env: prefix to expose the variable to the container and the app directly.</p><p>The MODEL_CACHE_ENABLED and LPL_ variables that we added here are requirements for additional packages and not default for Laravel.</p><p><em>Variable can also be overriden per environment if you set their level to </em><em>environment instead of </em><em>project.</em></p><pre>upsun variable:create --level project --prefix env --name APP_NAME --value=&quot;Wooply&quot;<br>upsun variable:create --level environment --environment main --prefix env --name APP_ENV --value=&quot;production&quot;<br>upsun variable:create --level environment --environment main --prefix env --name APP_DEBUG --value=&quot;false&quot;<br><br>upsun variable:create --level project --prefix env --name LOG_CHANNEL --value=&quot;stack&quot;<br>upsun variable:create --level project --prefix env --name LOG_DEPRECATIONS_CHANNEL --value=&quot;null&quot;<br>upsun variable:create --level environment --environment main --prefix env --name LOG_LEVEL --value=&quot;error&quot;<br><br>upsun variable:create --level environment --environment main --prefix env --name MODEL_CACHE_ENABLED --value=&quot;true&quot;<br><br>upsun variable:create --level project --prefix env --name LPL_USER_MODEL --value=&quot;App\Models\User&quot;<br>upsun variable:create --level project --prefix env --name LPL_REMEMBER_LOGIN --value=&quot;true&quot;<br>upsun variable:create --level project --prefix env --name LPL_LOGIN_ROUTE --value=&quot;/magic-login&quot;<br>upsun variable:create --level project --prefix env --name LPL_LOGIN_ROUTE_NAME --value=&quot;magic-login&quot;<br>upsun variable:create --level project --prefix env --name LPL_LOGIN_ROUTE_EXPIRES --value=&quot;30&quot;<br>upsun variable:create --level project --prefix env --name LPL_REDIRECT_ON_LOGIN --value=&quot;/dashboard&quot;<br>upsun variable:create --level project --prefix env --name LPL_USER_GUARD --value=&quot;web&quot;<br>upsun variable:create --level project --prefix env --name LPL_USE_ONCE --value=&quot;false&quot;<br>upsun variable:create --level project --prefix env --name LPL_INVALID_SIGNATURE_MESSAGE --value=&quot;&quot;Expired or Invalid Link&quot;&quot;<br><br>upsun variable:create --level project --prefix env --name BROADCAST_DRIVER --value=&quot;redis&quot;<br>upsun variable:create --level project --prefix env --name CACHE_DRIVER --value=&quot;redis&quot;<br>upsun variable:create --level project --prefix env --name FILESYSTEM_DISK --value=&quot;local&quot;<br>upsun variable:create --level project --prefix env --name QUEUE_CONNECTION --value=&quot;redis&quot;<br>upsun variable:create --level project --prefix env --name SESSION_DRIVER --value=&quot;redis&quot;<br>upsun variable:create --level project --prefix env --name SESSION_LIFETIME --value=&quot;120&quot;<br><br>upsun variable:create --level project --prefix env --name MAIL_FROM_ADDRESS --value=&quot;&quot;hello@wooply.co&quot;&quot;<br>upsun variable:create --level project --prefix env --name MAIL_FROM_NAME --value=&quot;Wooply&quot;<br><br>upsun variable:create --level project --prefix env --name VITE_APP_NAME --value=&quot;Wooply&quot;</pre><p>Everything is now ready to push our code.</p><p>If you are using private packages like Laravel Nova, you will need to inject the composer configuration as a variable. It can be done with the following:</p><pre>upsun variable:create --level project --name env:COMPOSER_AUTH \<br>  --json true --visible-runtime false --sensitive true --visible-build true \<br>  --value &#39;{&quot;http-basic&quot;: {&quot;nova.laravel.com&quot;: {&quot;username&quot;: &quot;USERNAME&quot;, &quot;password&quot;: &quot;PASSWORD&quot;}}}&#39;</pre><h3>First deploy</h3><p>Still in the base directory, you can now use upsun push to push your commits to the Upsun remote:</p><pre>upsun push<br>Selected project: Wooply.co (snacckbxx5cee)<br><br>Pushing HEAD to the environment main (type: production).<br><br>Are you sure you want to continue? [Y/n]<br><br>  Enumerating objects: 580, done.<br>  Counting objects: 100% (580/580), done.<br>  Delta compression using up to 10 threads<br>  Compressing objects: 100% (544/544), done.<br>  Writing objects: 100% (580/580), 4.60 MiB | 3.45 MiB/s, done.<br>  Total 580 (delta 191), reused 0 (delta 0), pack-reused 0<br><br>  Validating submodules<br><br>  Validating configuration files<br><br>  Processing activity: Guillaume Moigneu pushed to Main<br>      Found 13 commits<br><br>      Building application &#39;wooply&#39; (runtime type: php:8.2, tree: a84c514)</pre><p>The Upsun deployment pipeline will start building your project. We will go into this later in more details. If you encountered an error during that process, update the configuration or variables and do a upsun redeploy to restart the process.</p><p>The deploy phase is now complete and prints out your project URLs. Not that they are auto-generated for now as we don’t have added any domain yet:</p><pre>Opening environment<br>        Environment configuration<br>          wooply (type: php:8.2, cpu: 0.5, memory: 224, disk: 512)<br>          postgresql (type: postgresql:15, cpu: 0.5, memory: 1408, disk: 512)<br>          redis (type: redis:7.0, cpu: 0.5, memory: 1088)<br><br>        Environment routes<br>          http://main-bvxea6i-snacckbxx5cee.us-3.platformsh.site/ redirects to https://main-bvxea6i-snacckbxx5cee.us-3.platformsh.site/<br>          http://www.main-bvxea6i-snacckbxx5cee.us-3.platformsh.site/ redirects to https://www.main-bvxea6i-snacckbxx5cee.us-3.platformsh.site/<br>          https://main-bvxea6i-snacckbxx5cee.us-3.platformsh.site/ is served by application `wooply`<br>          https://www.main-bvxea6i-snacckbxx5cee.us-3.platformsh.site/ redirects to https://main-bvxea6i-snacckbxx5cee.us-3.platformsh.site/</pre><p>Our project has also been deployed with default minimal resources for our containers and is now available on <a href="https://main-bvxea6i-snacckbxx5cee.us-3.platformsh.site/%60">https://main-bvxea6i-snacckbxx5cee.us-3.platformsh.site/</a>. Database migrations are run automatically on each deploy to ensure your code matches the database schema. You can see what exactly happens in the .upsun/config.yaml inside the build and deploy hooks.</p><p>Now that our application is working, let’s configure our Horizon worker.</p><h3>Setting up Horizon workers and queues</h3><p>If needed, add `laravel/horizon` to your local project and follow the <a href="https://laravel.com/docs/10.x/horizon">documentation on the Horizon page</a>.</p><pre>composer require laravel/horizon<br>php artisan horizon:install</pre><p>We are now going to add a separate application on our project. Open .upsun/config.yaml and add the following:</p><pre>applications:<br>[...]<br>  wooply:<br>  [...]<br>  workers:  <br>    horizon:  <br>     commands:  <br>         start: |  <br>          php artisan horizon</pre><p>This way, a new container will be started automatically and will spawn the Horizon process.</p><p>If you have restricted access to horizon in your HorizonServiceProvider.php, login to your application through the web. Once done, head to /horizon and you should be able to access your horizon dashboard:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wU1nkN7deNANAtHmWncKYQ.png" /></figure><p>Horizon will handle jobs that are populated by the queue. If you need to customize how Horizon works (queues, processes, …), please refer to the official <a href="https://laravel.com/docs/10.x/horizon">Laravel Horizon documentation</a>.</p><p>As any other container, the resources of the Horizon container can be customized. Head to the Configure resources panel of the Upsun console and change the resources as needed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WP9r5kB56LS63h7zZuEF_Q.png" /></figure><h3>Adding our domain name to the project</h3><p>On console.upsun.com , head to your main environment and click the top-right action: Go Live.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fw-O7IErIB35SbzjU_NuxA.png" /></figure><p>Copy the provided CNAME and head to your DNS provider management panel. I’m using CloudFlare here but any will do.</p><p>Add the CNAME record to your DNS zone:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K0qL1XAsnn7Hh1tPaQLF8w.png" /></figure><p>Note: If your DNS provider does not allow CNAME on @ records, take a look at <a href="https://docs.upsun.com/domains/steps/dns.html#cname-records">Upsun documentation on alternatives</a>.</p><p>Once done, add the domain to your project:</p><pre>upsun domain:add wooply.co<br>Use the --environment option (and optionally --attach) to add a domain to a non-production environment.<br><br>Selected project: Wooply.co (snacckbxx5cee)<br>Selected environment: main (type: production)<br><br>Adding the domain: wooply.co<br><br>Are you sure you want to continue? [Y/n]<br><br>Waiting for the activity: [dmfjsbev7dbcw] Guillaume Moigneu added domain wooply.co<br><br>Building application &#39;wooply&#39; (runtime type: php:8.2, tree: 30b62f6)<br>  Reusing existing build for this tree ID<br><br>Configuring resources<br><br>Provisioning certificates<br>  Validating 2 new domains<br>  Certificates<br>  - certificate 32dc903: expiring on 2024-05-28 15:02:43+00:00, covering wooply.co</pre><p>The Upsun platform will add the configuration and automatically provision Let’s Encrypt certificates for all your routes:</p><pre>Opening environment<br>  Environment configuration<br>    wooply (type: php:8.2, cpu: 0.5, memory: 224, disk: 512)<br>    wooply--horizon (type: php:8.2, cpu: 0.5, memory: 224, disk: 0)<br>    postgresql (type: postgresql:15, cpu: 0.5, memory: 1408, disk: 512)<br>    redis (type: redis:7.0, cpu: 0.5, memory: 1088)<br><br>  Environment routes<br>    http://wooply.co/ redirects to https://wooply.co/<br>    http://www.wooply.co/ redirects to https://www.wooply.co/<br>    https://wooply.co/ is served by application `wooply`<br>    https://www.wooply.co/ redirects to https://wooply.co/</pre><p>Our Laravel application is now live on its own domain!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b543db39c1c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/deploy-friday/deploying-laravel-with-horizon-on-upsun-5b543db39c1c">Deploying Laravel with Horizon on Upsun</a> was originally published in <a href="https://medium.com/deploy-friday">Deploy Friday</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying a Remix JS app on Upsun in 5 minutes]]></title>
            <link>https://medium.com/deploy-friday/deploying-a-remix-js-app-on-upsun-in-5-minutes-6a2b38b111aa?source=rss----5c7d61eeb0b6---4</link>
            <guid isPermaLink="false">https://medium.com/p/6a2b38b111aa</guid>
            <category><![CDATA[node-js-tutorial]]></category>
            <category><![CDATA[remix]]></category>
            <category><![CDATA[node-js-development]]></category>
            <category><![CDATA[upsun]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Guillaume Moigneu]]></dc:creator>
            <pubDate>Tue, 21 May 2024 09:38:27 GMT</pubDate>
            <atom:updated>2024-03-01T15:34:55.339Z</atom:updated>
            <content:encoded><![CDATA[<p>Deploying any JavaScript/Node based framework on Upsun is easy. But as Remix does not have any bundled web server, let’s see how we can run it.</p><p>We will implement and deploy the <a href="https://remix.run/docs/en/main/start/tutorial">Remix Tutorial</a> here so you can refer to it if you need to grab the actual code.</p><p>Let’s start by initializing our application:</p><pre>npx create-remix@latest --template remix-run/remix/templates/remix-tutorial remix<br>Need to install the following packages:<br>create-remix@2.8.0<br>Ok to proceed? (y)<br><br> remix   v2.8.0 💿 Let&#39;s build a better website...<br>      ◼  Directory: Using remix as project directory<br><br>      ◼  Template: Using remix-run/remix/templates/remix-tutorial...<br>      ✔  Template copied<br><br>   git   Initialize a new git repository?<br>         Yes<br><br>  deps   Install dependencies with npm?<br>         Yes<br><br>      ✔  Dependencies installed<br><br>      ✔  Git initialized<br><br>  done   That&#39;s it!<br><br>         Enter your project directory using cd ./remix<br>         Check out README.md for development and deploy instructions.</pre><p>We can start it locally with npm run dev :</p><pre>npm run dev<br><br>&gt; dev<br>&gt; remix dev --manual<br><br><br> 💿  remix dev<br><br> info  building...<br> info  built (234ms)<br>[remix-serve] http://localhost:3000 (http://10.1.10.29:3000)</pre><p>We have followed <a href="https://remix.run/docs/en/main/start/tutorial">the amazing tutorial</a> and we are now presented with a fully working application:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x2OZxpOUL42rVP5IzPJjtA.gif" /></figure><p>Don’t forget to commit your changes to the local repository.</p><h3>Creating the Upsun configuration</h3><p>Let’s move to the fun part. Make sure your Upsun CLI is installed and logged in with upsun login.</p><p>We now need to create a new project to deploy our Remix. We will use upsun project:create :</p><pre>upsun project:create<br><br>Selected organization: Nls (nls) (by default)<br>Creating a project under the organization Nls (nls)<br><br>* Project title (--title)<br>Default: Untitled Project<br>&gt; Remix Deploy<br><br>* Region (--region)<br>The region where the project will be hosted.<br>Get a 3% discount on resources for regions with a carbon intensity of less than 100 gCO2eq/kWh.<br>  [au.platform.sh  ] Sydney, Australia (AWS)  [545 gC02eq/kWh]<br>  [au-2.platform.sh] Sydney, Australia (AZURE)  [545 gC02eq/kWh]<br>  [ca-1.platform.sh] Montreal, Canada (AWS)  [31 gC02eq/kWh]<br>  [ch-1.platform.sh] Zurich, Switzerland (GCP)  [91 gC02eq/kWh]<br>  [de-2.platform.sh] Frankfurt, Germany (GCP)  [416 gC02eq/kWh]<br>  [eu.platform.sh  ] Dublin, Ireland (AWS)  [386 gC02eq/kWh]<br>  [eu-2.platform.sh] Dublin, Ireland (AWS)  [386 gC02eq/kWh]<br>  [eu-4.platform.sh] Dublin, Ireland (AWS)  [386 gC02eq/kWh]<br>  [eu-5.platform.sh] Stockholm, Sweden (AWS)  [23 gC02eq/kWh]<br>  [fr-3.platform.sh] Gravelines, France (OVH)  [59 gC02eq/kWh]<br>  [fr-4.platform.sh] Paris, France (AZURE)  [59 gC02eq/kWh]<br>  [uk-1.platform.sh] London, United Kingdom (GCP)  [200 gC02eq/kWh]<br>  [us.platform.sh  ] Washington, United States (AWS)  [396 gC02eq/kWh]<br>  [us-2.platform.sh] Washington, United States (AWS)  [396 gC02eq/kWh]<br>  [us-3.platform.sh] Moses Lake, United States (AZURE)  [56 gC02eq/kWh]<br>  [us-4.platform.sh] Charleston, United States (GCP)  [647 gC02eq/kWh]<br>&gt; us-3.platform.sh<br><br>Default branch (--default-branch)<br>The default Git branch name for the project (the production environment)<br>Default: main<br>&gt;<br><br>Git repository detected: /Users/nls/psh/remix<br><br>Set the new project Remix Deploy as the remote for this repository? [Y/n]</pre><p>Choose a name and a deployment region. The command will automatically set a new git remote on your local repository.</p><p>We now have an empty Upsun project ready to be deployed to:</p><pre>The Upsun Bot is activating your project<br><br>      ▄     ▄<br>      ▄█▄▄▄█▄<br>    ▄██▄███▄██▄<br>    █ █▀▀▀▀▀█ █<br>       ▀▀ ▀▀<br><br>The project is now ready!<br>gd33gxlviuaa4<br><br>  Region: us-3.platform.sh<br>  Project ID: gd33gxlviuaa4<br>  Project title: Remix Deploy<br>  URL: https://console.upsun.com/01hd1s2bjt44369c0923a70g44/gd33gxlviuaa4<br>  Git URL: gd33gxlviuaa4@git.us-3.platform.sh:gd33gxlviuaa4.git<br><br>Setting the remote project for this repository to: Remix Deploy (gd33gxlviuaa4)</pre><p>We now need a configuration to tell Upsun how to run our project. Fortunately Upsun comes with the upsun ify command that will generate most of the YAML configuration automatically.</p><pre>upsun ify<br>Welcome to Upsun!<br>Let&#39;s get started with a few questions.<br><br>We need to know a bit more about your project. This will only take a minute!<br><br>What language is your project using? We support the following: [JavaScript/Node.js]<br><br>✓ Detected dependency managers: Npm<br>Tell us your project&#39;s application name: [remix]<br><br><br>                       (\_/)<br>We’re almost done...  =(^.^)=<br><br>Last but not least, unless you’re creating a static website, your project uses services. Let’s define them:<br><br>Select all the services you are using: []<br><br>You have not selected any service, would you like to proceed anyway? [Yes]</pre><p>We haven’t selected any services here because our data is fully local. If your application need to write some local files, look for the mounts: key in the newly created .upsun/config.yaml.</p><h3>Setting up the node.js server</h3><p>As mentionned in the Remix documentation, the default setup does not come with a web server capable of handling incoming requests.</p><blockquote>Remix is not an HTTP server, but rather a handler inside an existing HTTP server. Adapters allow the Remix handler to run inside the HTTP server. Some JavaScript runtimes, especially Node.js, have multiple ways to create an HTTP server. For example, in Node.js you can use Express.js, fastify, or raw http.createServer.</blockquote><p>We will go the easy route and use the <a href="https://remix.run/docs/en/main/other-api/serve">Remix App Server</a>. It is a basic production-ready node.js Express server made by the Remix team. Good enough for our use-case.</p><p>Running it locally is straight-forward:</p><pre>npm run build<br>npx remix-serve build/index.js<br><br>[remix-serve] http://localhost:3000<br>GET / 200 - - 544.353 ms</pre><p>Let’s implement this in our Upsun configuration. As the generated configuration already includes the build command, we just need to specify our start command. Upsun automatically inject the $HOST environment variable so you don’t need to explicitely add it to the command.</p><pre>    web:<br>      # Commands are run once after deployment to start the application process.<br>      # More information: https://docs.upsun.com/create-apps/app-reference.html#web-commands<br>      commands:<br>        # The command to launch your app. If it terminates, it’s restarted immediately.<br>        # You can use the $PORT or the $SOCKET environment variable depending on the socket family of your upstream<br>        start: &quot;npx remix-serve build/index.js&quot;</pre><p>Commit your changes and push your code:</p><pre>git add .upsun<br>git commit -m &quot;Add Upsun configuration&quot;<br>upsun push</pre><p>The Upsun platform is now fetching the dependencies and building the project. After a couple minutes, our application is now deployed:</p><pre>Creating environment main<br>        Starting environment<br>        Updating endpoints for remix<br>        Opening application remix and its relationships<br>        Executing deploy hook for application remix<br><br>        Opening environment<br>        Environment configuration<br>          remix (type: nodejs:20, cpu: 0.5, memory: 224, disk: 512)<br><br>        Environment routes<br>          http://main-bvxea6i-gd33gxlviuaa4.us-3.platformsh.site/ redirects to https://main-bvxea6i-gd33gxlviuaa4.us-3.platformsh.site/<br>          http://www.main-bvxea6i-gd33gxlviuaa4.us-3.platformsh.site/ redirects to https://www.main-bvxea6i-gd33gxlviuaa4.us-3.platformsh.site/<br>          https://main-bvxea6i-gd33gxlviuaa4.us-3.platformsh.site/ is served by application `remix`<br>          https://www.main-bvxea6i-gd33gxlviuaa4.us-3.platformsh.site/ redirects to https://main-bvxea6i-gd33gxlviuaa4.us-3.platformsh.site/<br><br>      Blackfire build scheduled</pre><p>You can access the app on the auto-generated URL:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m6HJ6m1JzmAwoDyI9TJ9Hw.png" /></figure><p>Congratulations! Our app is deployed and working. If you want to add more customization to how requests are handled, the <a href="https://remix.run/docs/en/main/other-api/adapter/">Remix documentation explains</a> how to implement @remix-run/express .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a2b38b111aa" width="1" height="1" alt=""><hr><p><a href="https://medium.com/deploy-friday/deploying-a-remix-js-app-on-upsun-in-5-minutes-6a2b38b111aa">Deploying a Remix JS app on Upsun in 5 minutes</a> was originally published in <a href="https://medium.com/deploy-friday">Deploy Friday</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Harnessing the power of Embeddings: a real-world example of a watch recommendation app using a…]]></title>
            <link>https://medium.com/deploy-friday/deploy-a-product-recommendation-app-on-upsun-that-leverages-embeddings-and-llms-5380fcd25589?source=rss----5c7d61eeb0b6---4</link>
            <guid isPermaLink="false">https://medium.com/p/5380fcd25589</guid>
            <category><![CDATA[embedding]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[upsun]]></category>
            <category><![CDATA[paas]]></category>
            <dc:creator><![CDATA[Guillaume Moigneu]]></dc:creator>
            <pubDate>Tue, 21 May 2024 09:37:32 GMT</pubDate>
            <atom:updated>2024-05-30T13:29:11.925Z</atom:updated>
            <content:encoded><![CDATA[<h3>Harnessing the power of Embeddings: a real-world example of a watch recommendation app using a vector database.</h3><p>Given the increasing integration of Machine Learning and AI/LLM models in all applications, it is crucial to explore the potential of a robust cloud application platform like <a href="https://upsun.com/">Upsun</a> for conducting these experiments.</p><p>As a watch enthusiast, what would be better than a recommendation engine to find the right watch for you? Here is the app we are going to build from scratch here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BC6-rHCejum9YaJOaP9GOQ.gif" /></figure><h3>Source</h3><p>You can find the full example repository on Github: <a href="https://github.com/gmoigneu/upsun-embeddings-watches">https://github.com/gmoigneu/upsun-embeddings-watches</a></p><h3>Architecture</h3><p>Let&#39;s review the architecture we are going to create and deploy:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aNXnQzfhqkLhtaj1Bidh6w.png" /></figure><p>Our application will be composed of 3 main components:</p><ol><li>A static React frontend is used to present the UI to the user.</li><li>An API built with Laravel 11 will handle the search requests and populate our database.</li><li>A Postgres instance to store our watches records and vectors for the embeddings of our content.</li></ol><p>For speed and cost efficiency reasons, we will leverage both OpenAI for creating embeddings and Groq for the LLM part. We will use llama3–8b-8192 as a model on Groq, but mixtral or any other would also work.</p><h3>Bootstrapping our apps</h3><p>You will need php8.x and composer installed locally for this to work. As we deploy our app on Upsun, you can grab the upsun cli by following <a href="https://docs.upsun.com/administration/cli.html">the steps here</a>.</p><p>First, create a new folder for your project:</p><pre>mkdir watches &amp;&amp; cd watches</pre><p>Let’s start by installing Laravel 11 with the API components:</p><pre>composer create-project laravel/laravel watches<br>cd watches<br>php artisan api:install</pre><p>You will need a few extra packages:</p><pre># required <br>composer require openai-php/client<br>composer require pgvector/pgvector<br><br># optional<br>composer require laravel/telescope # for debugging requests<br>composer require spatie/laravel-ray # amazing little debugging helper</pre><p>Let’s now create a new React app. We are using Vite here with the react-ts template but feel free to use any other variant. We will set up shacdn/ui for the UI to speed up building our interface.</p><pre>cd ..<br>npm create vite@latest frontend -- --template react-ts<br>cd frontend<br><br># Install shacdn/ui<br>npm create vite@latest<br>npm install -D tailwindcss postcss autoprefixer<br><br>npx tailwindcss init -p<br><br># (so you can import &quot;path&quot; without error)<br>npm i -D @types/node</pre><p>Add the following code to the tsconfig.json file to resolve paths:</p><pre>{<br>  &quot;compilerOptions&quot;: {<br>    // ...<br>    &quot;baseUrl&quot;: &quot;.&quot;,<br>    &quot;paths&quot;: {<br>      &quot;@/*&quot;: [<br>        &quot;./src/*&quot;<br>      ]<br>    }<br>    // ...<br>  }<br>}</pre><p>Add the following code to the vite.config.ts so your app can resolve paths without error</p><pre>// vite.config.ts<br><br>import path from &quot;path&quot;<br>import react from &quot;@vitejs/plugin-react&quot;<br>import { defineConfig } from &quot;vite&quot;<br><br>export default defineConfig({<br>  plugins: [react()],<br>  resolve: {<br>    alias: {<br>      &quot;@&quot;: path.resolve(__dirname, &quot;./src&quot;),<br>    },<br>  },<br>})</pre><p>Now run the shacdn init with the following settings:</p><pre>npx shadcn-ui@latest init<br><br>Would you like to use TypeScript (recommended)? yes<br>Which style would you like to use? › Default<br>Which color would you like to use as base color? › Slate<br>Where is your global CSS file? › › src/index.css<br>Do you want to use CSS variables for colors? › yes<br>Where is your tailwind.config.js located? › tailwind.config.js<br>Configure the import alias for components: › @/components<br>Configure the import alias for utils: › @/lib/utils<br>Are you using React Server Components? › no (no)</pre><p>Add the needed components for our UI:</p><pre>npx shadcn-ui@latest add button<br>npx shadcn-ui@latest add textarea</pre><p>Our React app will use two extra packages:</p><pre>npm i @microsoft/fetch-event-source # AJAX requests with EventStream support<br>npm i axios # for making API requests</pre><p>Our two apps are now bootstrapped. Time to initialize our git repo:</p><pre>cd ..<br>git init .<br>git add watches <br>git commit -m &quot;Add Laravel API to the repo&quot;<br><br>git add frontend <br>git commit -m &quot;Add React frontend to the repo&quot;</pre><h3>Setting up our local development environment &amp; infrastructure</h3><p>While you could use Laravel Sail or any other Docker-based local setup to develop the project, I find relying on the Upsun tethering feature always way quicker. It maps the remote services (database, Redis, etc.) to local ports, so you only need to run the runtimes (PHP, JS, …) locally.</p><p>To do that, we first need to go through the Upsun configuration. While you can use the upsun ify CLI command to generate an automatic configuration, here is the complete configuration explained. Create a new .upsun/config.yaml and paste the following:</p><pre># Routing for the frontend and API<br>routes:<br>  &quot;https://frontend.{all}/&quot;: { type: upstream, upstream: &quot;frontend:http&quot; }<br>  &quot;https://api.{all}/&quot;: { type: upstream, upstream: &quot;app:http&quot; }<br>  &quot;http://{all}/&quot;: { type: redirect, to: &quot;https://frontend.{all}/&quot; }<br><br>services: <br>  database:<br>    type: postgresql:15 # We will use Postgres with the vector extension<br>    configuration:<br>      extensions:<br>        - vector<br>  redis: # Redis is used for the Laravel cache<br>    type: redis:7.0<br> <br>applications:<br>  # Our react frontend<br>  frontend:<br>    source:<br>      root: &quot;frontend&quot; # folder where the app is<br>    type: nodejs:20<br>    build:<br>      flavor: none<br>    web:<br>      locations:<br>        &quot;/&quot;:<br>          root: &quot;dist&quot; # Customize if your build outputs the app somewhere else<br>          expires: 1h<br>          passthru: &quot;/index.html&quot;<br>      commands:<br>        start: sleep infinity # needed as we serve static files<br><br>    hooks: # customize if you use another build tool<br>      build: |<br>        set -x -e<br>        npm install <br>        npm run build<br>  app:<br>    source:<br>      root: &quot;watches&quot;<br><br>    type: php:8.3<br><br>    dependencies:<br>      php:<br>        composer/composer: &quot;^2&quot;<br><br>    runtime:<br>      extensions:<br>        - apcu<br>        - redis<br>        - blackfire<br>        - ctype<br>        - iconv<br>        - mbstring<br>        - pdo_pgsql<br>        - pdo_pgsql<br>        - sodium<br>        - xsl<br>    build:<br>      flavor: none<br>    web:<br>      locations:<br>        &quot;/&quot;:<br>          root: &quot;public&quot;<br>          expires: 1h<br>          passthru: &quot;/index.php&quot;<br>    mounts: # Where Laravel needs write access<br>      &quot;/.config&quot;:<br>        source: &quot;storage&quot;<br>        source_path: &quot;config&quot;<br>        <br>      &quot;bootstrap/cache&quot;:<br>        source: &quot;storage&quot;<br>        source_path: &quot;cache&quot;<br>        <br>      &quot;storage&quot;:<br>        source: &quot;storage&quot;<br>        source_path: &quot;storage&quot;<br>    relationships:<br>      # link our services<br>      database: &quot;database:postgresql&quot;<br>      redis: &quot;redis:redis&quot;<br>    hooks:<br>      build: |<br>        set -eux<br>        composer --no-ansi --no-interaction install --no-progress --prefer-dist --optimize-autoloader --no-dev<br>      deploy: |<br>        # customize if needed but should be ok for Laravel<br>        set -eux<br>        mkdir -p storage/framework/sessions<br>        mkdir -p storage/framework/cache<br>        mkdir -p storage/framework/views<br>        php artisan migrate --force<br>        php artisan optimize:clear<br></pre><p>Once done, we must inject some variables into our Laravel app to grab the proper credentials. Create the watches/.environment file with the following:</p><pre># Set database environment variables<br>export DB_HOST=&quot;$DATABASE_HOST&quot;<br>export DB_PORT=&quot;$DATABASE_PORT&quot;<br>export DB_PATH=&quot;$DATABASE_PATH&quot;<br>export DB_USERNAME=&quot;$DATABASE_USERNAME&quot;<br>export DB_PASSWORD=&quot;$DATABASE_PASSWORD&quot;<br>export DB_SCHEME=&quot;postgresql&quot;<br>export DATABASE_URL=&quot;${DB_SCHEME}://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_PATH}&quot;<br><br># Set Laravel-specific environment variables<br>export DB_CONNECTION=&quot;pgsql&quot;<br>export DB_DATABASE=&quot;$DB_PATH&quot;<br><br># Set Cache environment variables<br>export CACHE_STORE=&quot;redis&quot;<br>export CACHE_HOST=&quot;$REDIS_HOST&quot;<br>export CACHE_PORT=&quot;$REDIS_PORT&quot;<br>export CACHE_SCHEME=&quot;$REDIS_SCHEME&quot;<br>export CACHE_URL=&quot;${CACHE_SCHEME}://${CACHE_HOST}:${CACHE_PORT}&quot;<br><br># Set Redis environment variables<br>export REDIS_URL=&quot;$CACHE_URL&quot;</pre><p>You can customize any other environment variable this way. Remember they will always be the same value as this is committed to our repo.</p><p>Let’s add the configuration to our git repo:</p><pre>git add .upsun<br>git add .environment<br>git commit -m &quot;Add Upsun configuration&quot;</pre><h3>Our first deploy</h3><p>Let’s create an Upsun project for our application:</p><pre>upsun project:create<br><br>* Project title (--title)<br>Default: Untitled Project<br>&gt; Watch finder<br><br>* Region (--region)<br>The region where the project will be hosted.<br>Get a 3% discount on resources for regions with a carbon intensity of less than 100 gCO2eq/kWh.<br>  [au.platform.sh  ] Sydney, Australia (AWS)  [545 gC02eq/kWh]<br>  [au-2.platform.sh] Sydney, Australia (AZURE)  [545 gC02eq/kWh]<br>  [ca-1.platform.sh] Montreal, Canada (AWS)  [31 gC02eq/kWh]<br>  [ch-1.platform.sh] Zurich, Switzerland (GCP)  [91 gC02eq/kWh]<br>  [de-2.platform.sh] Frankfurt, Germany (GCP)  [416 gC02eq/kWh]<br>  [eu.platform.sh  ] Dublin, Ireland (AWS)  [386 gC02eq/kWh]<br>  [eu-2.platform.sh] Dublin, Ireland (AWS)  [386 gC02eq/kWh]<br>  [eu-4.platform.sh] Dublin, Ireland (AWS)  [386 gC02eq/kWh]<br>  [eu-5.platform.sh] Stockholm, Sweden (AWS)  [23 gC02eq/kWh]<br>  [fr-3.platform.sh] Gravelines, France (OVH)  [59 gC02eq/kWh]<br>  [fr-4.platform.sh] Paris, France (AZURE)  [59 gC02eq/kWh]<br>  [uk-1.platform.sh] London, United Kingdom (GCP)  [200 gC02eq/kWh]<br>  [us.platform.sh  ] Washington, United States (AWS)  [396 gC02eq/kWh]<br>  [us-2.platform.sh] Washington, United States (AWS)  [396 gC02eq/kWh]<br>  [us-3.platform.sh] Moses Lake, United States (AZURE)  [56 gC02eq/kWh]<br>  [us-4.platform.sh] Charleston, United States (GCP)  [647 gC02eq/kWh]<br>&gt; us-3.platform.sh<br><br>Default branch (--default-branch)<br>The default Git branch name for the project (the production environment)<br>Default: main<br>&gt;<br><br>Are you sure you want to continue? [Y/n]</pre><p>The Upsun bot will then provide an empty project for you and set the remote in your local git repository. Once done, you are ready to deploy:</p><pre>upsun push</pre><p>The pipeline will build and deploy both apps. After a couple of minutes, the boilerplate apps will be available on:</p><pre>https://frontend.&lt;branch&gt;.&lt;project&gt;.&lt;region&gt;.platformsh.site<br>https://app.&lt;branch&gt;.&lt;project&gt;.&lt;region&gt;.platformsh.site</pre><p>You should be directed to the default pages for both the React and Laravel applications.</p><p>We can now connect to our remote database and cache services:</p><pre>upsun tunnel:open<br>Enter a number to choose an app:<br>  [0] app<br>  [1] frontend<br> &gt; 0<br><br>Are you sure you want to open SSH tunnel(s) to the environment main (type: production)? [Y/n]<br><br>SSH tunnel opened to database at: pgsql://main:main@127.0.0.1:30000/main<br>SSH tunnel opened to redis at: redis://127.0.0.1:30001</pre><p>You can now edit your local watches/.env to use these services:</p><pre>DB_CONNECTION=pgsql<br>DB_HOST=127.0.0.1<br>DB_PORT=3000<br>DB_DATABASE=main<br>DB_USERNAME=main<br>DB_PASSWORD=main<br><br>SESSION_DRIVER=redis<br>SESSION_LIFETIME=120<br>SESSION_ENCRYPT=false<br>SESSION_PATH=/<br>SESSION_DOMAIN=null<br><br>BROADCAST_CONNECTION=redis<br>FILESYSTEM_DISK=local<br>QUEUE_CONNECTION=redis<br><br>CACHE_STORE=redis<br>CACHE_PREFIX=<br><br>REDIS_CLIENT=phpredis<br>REDIS_HOST=127.0.0.1<br>REDIS_PASSWORD=null<br>REDIS_PORT=30001</pre><blockquote>You will need your local PHP runtime to have the phpredis extension loaded. Please refer to the following <a href="https://laravel.com/docs/11.x/redis#introduction">documentation on the Laravel site</a>.</blockquote><p>If you want to use test hostnames for your applications, edit /etc/hosts or your Windows host file with the following or any other names you like:</p><pre>127.0.0.1 watches.test frontend.watches.test api.watches.test</pre><p>If so, update the .env file with the proper hostname:</p><pre>APP_URL=http://api.watches.test</pre><p>We can now launch our development services. In two terminals, run:</p><pre>php artisan serve</pre><pre>npm run dev -- --host=frontend.watches.test</pre><p>Note the -- for the argument to be able to run. Your local applications are now available at http://frontend.watches.test:5137 and http://api.watches.test.</p><h3>Getting some data about watches</h3><p>As we will recommend a specific watch to our user, we must first have a database containing the potential results. Fortunately, Kaggle has a <a href="https://www.kaggle.com/datasets/rkiattisak/luxury-watches-price-dataset">Luxury Watch Dataset available for download</a>. Create an account if needed and download the CSV file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gxvdmCjJdRoPQRCpuyf2yw.png" /></figure><p>We will now move and rename the CSV file into our project:</p><pre>mkdir watches/seeds/<br>mv ~/Downloads/Luxury\ watch.csv ./seeds/watches-full.csv</pre><h3>Configuring our external services</h3><p>For us to use OpenAI and Grok APIs, we need to inject our credentials. Create new API keys from <a href="https://platform.openai.com/api-keys">https://platform.openai.com/api-keys</a> and <a href="https://console.groq.com/keys">https://console.groq.com/keys</a></p><p>In Laravel, we will add the respective arrays in the services configuration:</p><pre>&lt;?php<br><br>return [<br><br>  &#39;openai&#39; =&gt; [<br>    &#39;key&#39; =&gt; env(&#39;OPENAI_API_KEY&#39;),<br>  ],<br><br>  &#39;groq&#39; =&gt; [<br>    &#39;key&#39;=&gt; env(&#39;GROQ_API_KEY&#39;),<br>  ],</pre><p>Once done, add the variables to your local .env file:</p><pre>APP_URL=http://api.watches.test<br>[...]<br>OPENAI_API_KEY=sk-proj-**************<br>GROQ_API_KEY=gsk_**************</pre><p>For them to work on Upsun, create two variables using the cli :</p><pre>upsun variable:create --name GROQ_API_KEY -l project --sensitive=true --prefix=env: --value=gsk_xxxxxxxxxxxxxx<br>upsun variable:create --name OPENAI_API_KEY -l project --sensitive=true --prefix=env: --value=sk-proj-xxxxxxxxxxxxxx</pre><h3>Let’s import our watches into the database</h3><p>We will need a few things first. Create a Watch model. You can create it using php artisan make:model Watch --m or by adding the files manually:</p><pre>&lt;?php // watches/app/Models/Watch.php<br><br>namespace App\Models;<br><br>use Illuminate\Database\Eloquent\Factories\HasFactory;<br>use Illuminate\Database\Eloquent\Model;<br>use Pgvector\Laravel\HasNeighbors;<br>use Pgvector\Laravel\Vector;<br><br>class Watch extends Model<br>{<br>    use HasFactory, HasNeighbors;<br><br>    protected $casts = [&#39;embedding&#39; =&gt; Vector::class];<br><br>    protected $fillable = [<br>        &#39;brand&#39;,<br>        &#39;model&#39;,<br>        &#39;case_material&#39;,<br>        &#39;strap_material&#39;,<br>        &#39;movement_type&#39;,<br>        &#39;water_resistance&#39;,<br>        &#39;case_diameter_mm&#39;,<br>        &#39;case_thickness_mm&#39;,<br>        &#39;band_width_mm&#39;,<br>        &#39;dial_color&#39;,<br>        &#39;crystal_material&#39;,<br>        &#39;complications&#39;,<br>        &#39;power_reserve&#39;,<br>        &#39;price_usd&#39;,<br>    ];<br>}</pre><p>Note in the model that we use our Vector custom type to store and cast the embedding column. Create the migration file for the model:</p><pre>php artisan make migration create_watches_table</pre><pre>&lt;?php<br><br>use Illuminate\Database\Migrations\Migration;<br>use Illuminate\Database\Schema\Blueprint;<br>use Illuminate\Support\Facades\Schema;<br><br>return new class extends Migration<br>{<br>    /**<br>     * Run the migrations.<br>     */<br>    public function up(): void<br>    {<br>        Schema::create(&#39;watches&#39;, function (Blueprint $table) {<br>            $table-&gt;id();<br>            $table-&gt;string(&#39;brand&#39;);<br>            $table-&gt;string(&#39;model&#39;);<br>            $table-&gt;string(&#39;case_material&#39;)-&gt;nullable();<br>            $table-&gt;string(&#39;strap_material&#39;)-&gt;nullable();<br>            $table-&gt;string(&#39;movement_type&#39;)-&gt;nullable();<br>            $table-&gt;string(&#39;water_resistance&#39;)-&gt;nullable();<br>            $table-&gt;decimal(&#39;case_diameter_mm&#39;, 5, 2)-&gt;nullable();<br>            $table-&gt;decimal(&#39;case_thickness_mm&#39;, 5, 2)-&gt;nullable();<br>            $table-&gt;decimal(&#39;band_width_mm&#39;, 5, 2)-&gt;nullable();<br>            $table-&gt;string(&#39;dial_color&#39;)-&gt;nullable();<br>            $table-&gt;string(&#39;crystal_material&#39;)-&gt;nullable();<br>            $table-&gt;string(&#39;complications&#39;)-&gt;nullable();<br>            $table-&gt;string(&#39;power_reserve&#39;)-&gt;nullable();<br>            $table-&gt;integer(&#39;price_usd&#39;)-&gt;nullable();<br>            $table-&gt;vector(&#39;embedding&#39;, 1536)-&gt;nullable();<br>            $table-&gt;timestamps();<br>        });<br>    }<br><br>    /**<br>     * Reverse the migrations.<br>     */<br>    public function down(): void<br>    {<br>        Schema::dropIfExists(&#39;watches&#39;);<br>    }<br>};</pre><p>Our embedding columns will use the vector type from the pg_vector package.</p><p>Migrate the database:</p><pre>php artisan migrate</pre><p>We now need to code a job that will import the watches and generate the embedding. Create the command and the job:</p><pre>php artisan make:command Vectorize<br>php artisan make:job Vectorize</pre><p>Our command is simple and only triggers the job:</p><pre>&lt;?php // watches/app/Console/Commands/Vectorize.php<br><br>namespace App\Console\Commands;<br><br>use Illuminate\Console\Command;<br><br>class Vectorize extends Command<br>{<br>    /**<br>     * The name and signature of the console command.<br>     *<br>     * @var string<br>     */<br>    protected $signature = &#39;app:vectorize&#39;;<br><br>    /**<br>     * The console command description.<br>     *<br>     * @var string<br>     */<br>    protected $description = &#39;Vectorize the CSV file and stores it into the database.&#39;;<br><br>    /**<br>     * Execute the console command.<br>     */<br>    public function handle()<br>    {<br>        \App\Jobs\Vectorize::dispatchSync();<br>    }<br>}</pre><p>Our Vectorize job is more complex. It will:</p><ol><li>Parse the CSV and create the watches in the database</li><li>Combine all attributes of each watch into a text string that we will send to OpenAI to get an embedding</li><li>Store that embedding in our database as a vector</li></ol><pre>&lt;?php<br><br>namespace App\Jobs;<br><br>use App\Models\Watch;<br>use DB;<br>use Illuminate\Bus\Queueable;<br>use Illuminate\Contracts\Queue\ShouldQueue;<br>use Illuminate\Foundation\Bus\Dispatchable;<br>use Illuminate\Queue\InteractsWithQueue;<br>use Illuminate\Queue\SerializesModels;<br>use OpenAI;<br>use Pgvector\Laravel\Vector;<br><br>class Vectorize implements ShouldQueue<br>{<br>    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;<br><br>    /**<br>     * Create a new job instance.<br>     */<br>    public function __construct()<br>    {<br>        //<br>    }<br><br>    /**<br>     * Execute the job.<br>     */<br>    public function handle(): void<br>    {<br>        // Empty DB<br>        DB::table(&#39;watches&#39;)-&gt;truncate();<br><br>        $client = OpenAI::client(config(&#39;services.openai.key&#39;));<br><br>        // Parse the CSV and get the headers<br>        $file = base_path(&quot;seeds/watches-full.csv&quot;);<br>        $csv = array_map(&quot;str_getcsv&quot;, file($file));<br>        $header = array_shift($csv);<br><br>        // Transform the rows into an array with the header and the row<br>        $watches = array_map(fn($row) =&gt; array_combine($header, $row), $csv);<br><br>        // Loop the CSV and create the watches in database<br>        foreach($csv as $row) {<br>            try{<br>                Watch::create([<br>                    &#39;brand&#39; =&gt; $row[0],<br>                    &#39;model&#39; =&gt; $row[1],<br>                    &#39;case_material&#39; =&gt; $row[2],<br>                    &#39;strap_material&#39; =&gt; $row[3],<br>                    &#39;movement_type&#39; =&gt; $row[4],<br>                    &#39;water_resistance&#39; =&gt; $row[5],<br>                    &#39;case_diameter_mm&#39; =&gt; $row[6],<br>                    &#39;case_thickness_mm&#39; =&gt; $row[7],<br>                    &#39;band_width_mm&#39; =&gt; $row[8],<br>                    &#39;dial_color&#39; =&gt; $row[9],<br>                    &#39;crystal_material&#39; =&gt; $row[10],<br>                    &#39;complications&#39; =&gt; $row[11],<br>                    &#39;power_reserve&#39; =&gt; $row[12],<br>                    &#39;price_usd&#39; =&gt; preg_replace(&quot;/[^0-9.]/&quot;, &quot;&quot;, $row[13]),<br>                ]);<br>            } catch(\Exception $e){<br>                ray($row);<br>            }<br>        }<br><br>        // Create a text version of the watch row that will list the <br>        // attributes and their values as a large string<br>        $watchesInput = collect($watches)-&gt;map(function ($watch) {<br>            $str = &#39;&#39;;<br>            foreach($watch as $key=&gt;$item) {<br>                $str .= $key.&#39;:&#39;.$item.&#39;,&#39;;<br>            }<br>            return rtrim($str, &#39;|&#39;);<br>        });<br><br>        // Send the text version of all watches to the OpenAI embedding <br>        // endpoint. We do a batch query to avoid sending 500 different API calls<br>        $response = $client-&gt;embeddings()-&gt;create([<br>            &#39;model&#39; =&gt; &#39;text-embedding-3-small&#39;,<br>            &#39;input&#39; =&gt; $watchesInput-&gt;toArray()<br>        ]);<br><br>        // Loop through the embeddings sent and update our watches<br>        // in the database with the matching embedding<br>        foreach ($response-&gt;embeddings as $embedding) {<br>            $watch = Watch::find($embedding-&gt;index + 1);<br>            $watch-&gt;embedding = new Vector($embedding-&gt;embedding);<br>            $watch-&gt;save();<br>        }<br>    }<br>}</pre><p>You can now run the job by triggering:</p><pre>php artisan app:vectorize</pre><p>It should take a few seconds. Once done you can connect to your Postgres instance and check the results:</p><pre>upsun sql<br>Enter a number to choose an app:<br>  [0] app<br>  [1] frontend<br> &gt; 0<br><br>psql (16.2 (Debian 16.2-1.pgdg120+2), server 15.6 (Debian 15.6-1.pgdg110+2))<br>Type &quot;help&quot; for help.<br><br>main=&gt; SELECT brand, model FROM watches;<br><br>    brand        |          model<br>---------------------+--------------------------<br> Omega               | Seamaster<br> Tag Heuer           | Carrera<br> Breitling           | Navitimer<br><br>[...]</pre><p>Perfect, we have our database of 508 watches and the embeddings created from their content.</p><h3>Create the API controller to get the search request</h3><p>Let&#39;s create the API controller for our frontend to query the database. The controller will take care of:</p><ol><li>Parsing and validating the query value sent through the POST request</li><li>Creating an embedding of the query</li><li>Query the database using nearestNeighbors to find the most relevant watch</li><li>Send a streamed request to the Grok Chat API to create a proper answer with the details of the watch and the reason why it is the best.</li><li>As the response is streamed from Grok, we automatically stream it to our client using an Event Stream. This will allow us to display the answer being generated in real-time instead of waiting for the full answer being processes.</li></ol><pre>&lt;?php // watches/app/Http/Controllers/WatchController.php<br><br>namespace App\Http\Controllers;<br><br>use App\Helpers\MarkdownHelper;<br>use App\Http\Requests\SearchWatchRequest;<br>use App\Models\Watch;<br>use OpenAI;<br>use Pgvector\Laravel\Distance;<br>use Pgvector\Laravel\Vector;<br><br>class WatchController extends Controller<br>{<br>    public function search(SearchWatchRequest $request)<br>    {<br>        $embeddingClient = OpenAI::client(config(&#39;services.openai.key&#39;));<br>        $chatClient = OpenAI::factory()<br>            -&gt;withApiKey(config(&#39;services.groq.key&#39;))<br>            -&gt;withBaseUri(&#39;api.groq.com/openai/v1&#39;) // default: api.openai.com/v1<br>            -&gt;make();<br><br>        // Create the embedding of the query<br>        $response = $embeddingClient-&gt;embeddings()-&gt;create([<br>            &#39;model&#39; =&gt; &#39;text-embedding-3-small&#39;,<br>            &#39;input&#39; =&gt; $request-&gt;input(&#39;query&#39;)<br>        ]);<br><br>        $embedding = new Vector($response-&gt;embeddings[0]-&gt;embedding);<br><br>        // Find the closest watch<br>        $neighbor = Watch::query()-&gt;nearestNeighbors(&#39;embedding&#39;, $embedding, Distance::L2)-&gt;first();<br><br>        // Ask OpenAI for the closest watches<br>        $stream = $chatClient-&gt;chat()-&gt;createStreamed([<br>            &#39;model&#39; =&gt; &#39;llama3-8b-8192&#39;,<br>            &#39;messages&#39; =&gt; [<br>                [<br>                    &#39;role&#39; =&gt; &#39;system&#39;,<br>                    &#39;content&#39; =&gt; &quot;You are an helpful AI that will recommend watches to the user. The watch selected is below with its attributes as a list. Your response is a markdown document.First, output the brand and model of the watch as a title.  Second, send the user a bullet list view of the watch attributes without doing any modification. Then, add a paragrah of why this watch matches their request using the watch attributes.&quot;<br>                ],<br>                [<br>                    &#39;role&#39; =&gt; &#39;user&#39;,<br>                    &#39;content&#39; =&gt; &quot;The recommended watch is: &quot; . MarkdownHelper::toMarkdown($neighbor)<br>                ],<br>                [&#39;role&#39; =&gt; &#39;user&#39;, &#39;content&#39; =&gt; $request-&gt;input(&#39;query&#39;)],<br>            ],<br>        ]);<br><br>        return response()-&gt;stream(function () use ($stream) {<br>            $i = 0;<br>            $text = &quot;&quot;;<br><br>            foreach($stream as $response){<br>                $text .= $response-&gt;choices[0]-&gt;delta-&gt;content;<br><br>                $i++;<br><br>                echo &quot;event: chunk\n&quot;;<br>                echo &quot;data: {\&quot;index\&quot;: &quot; . $i . &quot;, \&quot;chunk\&quot;: &quot; . json_encode($response-&gt;choices[0]-&gt;delta-&gt;content) . &quot;}\n\n&quot;;<br><br>                ob_flush();<br>                flush();<br><br>                // Break the loop if the client aborted the connection (closed the page)<br>                if (connection_aborted()) {<br>                    break;<br>                }<br>            }<br>        }, 200, [<br>            &#39;Cache-Control&#39; =&gt; &#39;no-cache&#39;,<br>            &#39;X-Accel-Buffering&#39; =&gt; &#39;no&#39;,<br>            &#39;Content-Type&#39; =&gt; &#39;text/event-stream&#39;,<br>        ]);<br>    }<br>}</pre><p>As you can see, we are validating the POST request via the SearchWatchRequest validator. Remember to return true in the authorize() method, or you will get a 403 when POSTing to it.</p><pre>&lt;?php // watches/app/Http/Requests/SearchWatchRequest.php<br><br>namespace App\Http\Requests;<br><br>use Illuminate\Foundation\Http\FormRequest;<br><br>class SearchWatchRequest extends FormRequest<br>{<br>    /**<br>     * Determine if the user is authorized to make this request.<br>     */<br>    public function authorize(): bool<br>    {<br>        return true;<br>    }<br><br>    /**<br>     * Get the validation rules that apply to the request.<br>     *<br>     * @return array&lt;string, \Illuminate\Contracts\Validation\ValidationRule|array&lt;mixed&gt;|string&gt;<br>     */<br>    public function rules(): array<br>    {<br>        return [<br>            &#39;query&#39; =&gt; &#39;required|string&#39;,<br>        ];<br>    }<br>}</pre><p>In a production application, you must also validate that the user exists and is not abusing the system. You can leverage Laravel Sanctum for this.</p><h3>Wrap up the Laravel configuration</h3><p>Two tasks need to be done before our Laravel is fully operational. First, create a new route to handle the request:</p><pre>&lt;?php // watches/routes/api.php<br><br>use Illuminate\Support\Facades\Route;<br><br>Route::post(&#39;/watch&#39;, [App\Http\Controllers\WatchController::class, &#39;search&#39;]);</pre><p>Then, as we will query our API through a React frontend, we need to make CORS will be correctly set. Publish the CORS configuration file with:</p><pre>php artisan config:publish cors</pre><p>Open cors.php and review the settings:</p><pre>&lt;?php // watches/config/cors.php<br><br>return [<br>    &#39;paths&#39; =&gt; [&#39;api/&#39;, &#39;api/watch&#39;],<br>    &#39;allowed_methods&#39; =&gt; [&#39;*&#39;],<br>    &#39;allowed_origins&#39; =&gt; [&#39;*&#39;],<br>    &#39;allowed_origins_patterns&#39; =&gt; [&#39;*&#39;],<br>    &#39;allowed_headers&#39; =&gt; [&#39;*&#39;],<br>    &#39;exposed_headers&#39; =&gt; [],<br>    &#39;max_age&#39; =&gt; 0,<br>    &#39;supports_credentials&#39; =&gt; true,<br>];</pre><h3>Let’s test our API!</h3><p>You can now use curl or a tool like Postman to query the API and get your result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G3WdQjWJK47lV_BtfLZYKw.png" /></figure><p>As you can see, the result is streamed in chunks by our Laravel API. Congratulations!</p><p>Let’s deploy it!</p><p>Add the vectorize job in .upsun/config.yaml so it is done every time in the background after you deploy the app without impacting the app availability. You might want to trigger this manually if you have more data to avoid increasing your OpenAI bill too much.</p><pre>app:<br>    source:<br>      root: &quot;watches&quot;<br>    [...]<br>    hooks:<br>      build: |<br>        [...]<br>      deploy: |<br>        [...]<br>      post_deploy: |<br>        set -eux<br>        php artisan app:vectorize</pre><pre>git add .<br>git commit -m &quot;Working API&quot;<br>upsun push</pre><p>The deploy log will output the URLs for both endpoint. You can now retest the API with Postman on the Upsun API hostname.</p><h3>Time to build our frontend</h3><p>Let’s switch to our frontend React app now.</p><pre>cd ../frontend</pre><p>As our UI will be really straightforward, we only need two basic shacdn/ui components:</p><pre>npx shadcn-ui@latest add button<br>npx shadcn-ui@latest add textarea</pre><p>The components are now installed in src/components/ui .</p><p>We will use two different libraries to query our APIs:</p><ul><li>axios would be used to query other potential endpoints of our Laravel API</li><li><a href="http://twitter.com/microsoft/fetch-event-source">@microsoft/fetch-event-source</a> to stream the result from our API</li></ul><p>Let’s install both:</p><pre>npm i axios<br>npm i @microsoft/fetch-event-source<br><br># We also use markdown to format the output so let&#39;s install it<br>npm i react-markdown</pre><p>We are now creating a shared axios instance for our project with the configuration and a method to define our API URL:</p><pre>/* src/lib/axios.ts */<br>import Axios from &#39;axios&#39;<br><br>export const getApiURL = () =&gt; {<br>    if(window.location.hostname === &#39;watches.test&#39;) {<br>        return(&#39;http://api.watches.test&#39;)<br>    } else {<br>        return window.location.origin.replace(&#39;frontend&#39;, &#39;api&#39;)<br>    }<br>}<br><br><br>const entrypoint = getApiURL()<br><br>const axios = Axios.create({<br>    baseURL: entrypoint,<br>    headers: {<br>        &#39;X-Requested-With&#39;: &#39;XMLHttpRequest&#39;,<br>        &#39;Content-Type&#39;: &#39;application/json&#39;,<br>    },<br>})<br>export default axios</pre><p>getApiURL will use our local development values if the hostname is watches.test . If not, it will replace the frontend string with api on any other hostname. This will allow us to make it functional in any preview environment on Upsun as well as production. You can always change the logic there to map your own deployment needs.</p><h3>The main App.tsx</h3><p>It’s time to build that frontend application layout and logic:</p><pre>/* src/App.tsx */<br><br>import { useState } from &#39;react&#39;<br>import &#39;./App.css&#39;<br>import { Button } from &#39;./components/ui/button&#39;<br>import { Textarea } from &#39;./components/ui/textarea&#39;<br>import &#39;./index.css&#39;<br>import Markdown from &#39;react-markdown&#39;<br>import { fetchEventSource } from &#39;@microsoft/fetch-event-source&#39;<br>import { getApiURL } from &#39;./lib/axios&#39;<br>function App() {<br><br>  const [prompt, setPrompt] = useState(&#39;&#39;)<br>  const [answer, setAnswer] = useState(&#39;Try queries like: &quot;affordave dive watch&quot;, &quot;dress watch with a black dial&quot;, &quot;more affordable alternative to a Rolex submariner&quot;, ...&#39;)<br>  const [isStreaming, setIsStreaming] = useState(false)<br><br>  const submitForm = () =&gt; {<br>    newStreamResponse(prompt)<br>  }<br><br>  const newStreamResponse = async (prompt :string) =&gt; {<br>        const ctrl = new AbortController()<br>        setAnswer(&#39;&#39;)<br><br>        let messageContent = &#39;&#39;<br>        setIsStreaming(true)<br><br>        await fetchEventSource(`${getApiURL()}/api/watch`, {<br>            method: &#39;POST&#39;,<br>            headers: {<br>                &#39;Content-Type&#39;: &#39;application/json&#39;,<br>                &#39;Accept&#39;: &#39;*/*&#39;,<br>            },<br>            openWhenHidden: true,<br>            body: JSON.stringify({<br>              &#39;query&#39;: prompt,<br>            }),<br><br>            onmessage(ev) {<br>                const tmp = JSON.parse(ev.data)<br><br>                if (tmp.chunk !== null) {<br>                    messageContent += tmp.chunk<br>                    setAnswer(messageContent)<br>                }<br>            },<br>            onclose() {<br>                // do not retry<br>                ctrl.abort()<br>            },<br>            onerror(err) {<br>                console.log(err)<br>                // toast.error(&#39;Something unexpected happened.&#39;, {<br>                //     position: toast.POSITION.BOTTOM_RIGHT,<br>                //     toastId: &#39;prompt-error&#39;,<br>                // })<br>                ctrl.abort()<br>                throw err;<br>            },<br>            signal: ctrl.signal,<br>        }).then(() =&gt; {<br>            setIsStreaming(false)<br>        })<br>    }<br><br>  return (<br>    &lt;&gt;<br>      &lt;div className=&quot;grid w-full gap-2&quot;&gt;<br>        &lt;h1 className=&quot;text-4xl mb-8 text-center&quot;&gt;⌚ Watch Finder&lt;/h1&gt;<br>        &lt;Textarea <br>          onChange={(e) =&gt; setPrompt(e.target.value)} <br>          placeholder=&quot;Describe the watch you are looking for...&quot; <br>          value={prompt} /&gt;<br>        &lt;Button <br>          onClick={() =&gt; submitForm()}<br>          disabled={isStreaming || prompt === &#39;&#39;}<br>          &gt;Find a watch!&lt;/Button&gt;<br><br>        &lt;div className=&quot;p-4 rounded-sm my-8 bg-gray-100 prose lg:prose-md w-full max-w-max text-left&quot;&gt;<br>          &lt;Markdown&gt;{answer}&lt;/Markdown&gt;<br>        &lt;/div&gt;<br>      &lt;/div&gt;<br>    &lt;/&gt;<br>  )<br>}<br><br>export default App</pre><p>How it works:</p><ol><li>The JSX is rendered on load. We use a &lt;Markdown/&gt; field to render the answer.</li><li>The user writes a prompt in the main &lt;TextArea/&gt; that is store in a variable prompt using useState.</li><li>When clicking the &lt;Button/&gt; , the script triggers submitForm() which creates a newStreamResponse</li><li>newStreamResponse starts by setting the state variable streaming as true so we can use it to freeze our UI while the request loads and reset the answer as well as creating a local variable named messageContent to store the stream content coming back from the API.</li><li>It then uses fetchEventSource to query our Laravel API. The openWhenHidden option specifies if the stream should be listened to when the tab or window is not in focus. We pass our prompt as the body of this POST request.</li><li>The onmessage method defines how we treat incoming data from the Event stream. Here we concatenate the new chunk to our messageContent and then update the state variable answer to show the result. In case your content is too long or the chunks are coming in too fast, you might want to delay the update to avoid too many renderings.</li><li>When the stream ends, we reset the streaming variable to false .</li></ol><h3>Final deploy</h3><p>Once these files added, let’s deploy:</p><pre>git add .<br>git commit -m &quot;Add frontend&quot;<br>upsun push</pre><h3>The result</h3><p>You can now use the frontend URL that Upsun gave you in the deploy log to access your app. Let’s query it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z8XkMhRxQAeMD-XCGGhuYw.gif" /></figure><p>Everything works as expected! You can see in my recording above, that I am using a custom hostname. In your Upsun console, click the Go Live button and follow the instructions to configure your DNS and setup the domain!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nxjr3gUbM2_HWnwfs9e9iA.png" /></figure><h3>Conclusion</h3><p>While this example is stripped down to the core, it is interesting to see how you can leverage embeddings for search, classification or any other Machine Learning process. With all the tooling now available, it becomes super accessible to everyone to query models and run these applications on a Cloud Applications Platform like <a href="https://upsun.com/">Upsun.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5380fcd25589" width="1" height="1" alt=""><hr><p><a href="https://medium.com/deploy-friday/deploy-a-product-recommendation-app-on-upsun-that-leverages-embeddings-and-llms-5380fcd25589">Harnessing the power of Embeddings: a real-world example of a watch recommendation app using a…</a> was originally published in <a href="https://medium.com/deploy-friday">Deploy Friday</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>