Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Deploy Svelte apps to OpenShift

February 12, 2024
Yashwanth Maheshwaram

    Red Hat® OpenShift® is a unified platform to build, modernize, and deploy applications at scale. Red Hat OpenShift offers a great developer experience in shipping your applications to the cloud. JavaScript is the most popular programming language in the world and is used by millions of developers around the world. While it’s one programming language, there are many popular frameworks within JavaScript that need different approaches.

    In this series of articles, we are putting together a step-by-step guide that will enable you to be up and running JS applications on OpenShift. We expect you to have some familiarity with Svelte and Red Hat OpenShift. Just in can case you need a quick recap, checkout 

    • OpenShift video
    • Red Hat Developer Sandbox
    • Svelte site
    • Containerfile

    Table of contents:

    • Deploying Svelte apps on Red Hat OpenShift
    • Adding a Continuous Deployment(CD) pipelines to your app
    • Trigger the pipeline

    Steps to Deploy an Svelte on Red Hat OpenShift

    The Developer Sandbox for Red Hat OpenShift is a free-to-use OpenShift instance for you to experiment with OpenShift for your use cases.The development of dynamic and responsive web applications has evolved into a fundamental requirement. Node.js and Svelte stand out as formidable technologies capable of crafting these applications with finesse. Our workflow involves the creation and deployment of applications directly from GitHub onto an OpenShift sandbox environment.

    Follow these steps to start your sandbox instance and deploy your Svelte app:

    1. Create a Red Hat Sandbox account using https://developers.redhat.com/developer-sandbox 
    2. Once you have the account and are signed in, On the left side menu, click on +Add.
    3. Select Import from Git.
    4. Specify your Git repo URL. For the sake of this tutorial, we usehttps://github.com/redhat-developer-demos/svelte_OpenShift_example. But, you can choose any Svelte repo.
    5. Add a Containerfile to your repo. The Containerfile helps developers to specify the environment needed for running your applications. In case, you do not have a Containerfile on your project, you can add add one to your repo by referring to https://github.com/redhat-developer-demos/svelte_OpenShift_example/blob/main/Containerfile 
    6. OpenShift will detect the Containerfile from the git repository. In case the Containerfile is in a subdirectory, you need to provide the path of Containerfile. 
      [ NOTE: If the containerfile/Dockerfile is not detected, click Import Edit Strategy. Select as Dockerfile, define the path as Containerfile. ]
    7. Choose a  Resource Type field, please choose either Deployment or Serverless Deployment (default option) depending on your preference.
    8. Select Target Port under Advanced options to define the port 8080 that will receive the container's traffic.
    9. Click on Create.
    10. You will now be directed to the Topology view, and the application will commence deployment. Please allow some time for the build & deployment process to complete. While it is in progress, you will have the opportunity to monitor the logs.
    11. Once it’s done deploying, you can click on the ↗ OpenURL icon to see the webpage of your Svelte application running on OpenShift.

    In this tutorial, you learned how to deploy an Svelte application on Red Hat OpenShift. Red Hat OpenShift has powerful features that make it easy to manage and scale your Svelte application in production.

    Add Continuous Deployment

    Continuous deployment is a strategy in software development where code changes to an application are released automatically into the production environment. It speeds up time to market by eliminating the lag between coding and customer value. OpenShift enables developers to configure this using a few simple UI-based steps.

    Now, let’s begin adding CD to the application we just created:

    1. From the Topology view, select the application.
    2. Click on Actions dropdown.
    3. Select Edit <application name>.
    4. Check the Add pipeline checkbox. You can see the pipeline visualization if you’d like to understand the steps.
    5. Click Save.

    Trigger the CD pipeline

    A pipeline of applications is triggered when an application in the git repository is updated. 

    1. Create your application and add on the remote git repository or copy the above repository.
    2. The source files should be modified, committed, and pushed.
    3. Log in to the Developer Sandbox.
    4. Access your application in the Topology View.
    5. Select Pipeline option from the left menu.
    6. Checkout live build & deploy process.
    7. You can see your changes being deployed automatically.
    Last updated: April 12, 2024

    Recent Posts

    • Tekton joins the CNCF as an incubating project

    • Federated identity across the hybrid cloud using zero trust workload identity manager

    • Confidential virtual machine storage attack scenarios

    • Introducing virtualization platform autopilot

    • Integrate zero trust workload identity manager with Red Hat OpenShift GitOps

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.