Skip to content
/ demo Public

Demo app built with Nuon.

Notifications You must be signed in to change notification settings

nuonco/demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nuon Demo

Overview

This contains source code and Nuon config for a simple web service, and a couple installations of that service. It's purpose is to demonstrate how to package, deploy, and maintain an app for BYOC.

Project Structure

  • /.github/workflows: Basic automation using our Github Action.
  • /src: The source code for a simple web service.
  • /nuon: Nuon config files for packaging the service for deployment to customer AWS accounts.
    • installer.toml: The installer config. This drives a UI at https://demo-installer.vercel.app/, which is using our open-source installer project.
    • /nuon.aws-ecs-app.toml: Packages the app for stand-alone, turn-key deployment to AWS.
    • /nuon.aws-ecs-byovpc.toml: Packages the app for deployment to a customer's existing VPC.
    • /components: Config for pulling the app code from the /src directory.

Getting Started

You can fork this repo to test-drive Nuon, and get some hands-on experience with the BYOC development flow.

First, set up your Nuon account.

  1. Request a Nuon account.
  2. Once your account is created, log into the dashboard.
  3. Install the Nuon CLI.
  4. Run nuon login to authenticate from the CLI.

Then, create an app using the config files in this repo.

  1. Fork this repo.
  2. Clone your fork.
  3. Go to the ./nuon directory.
  4. Run nuon apps create --name="aws-ecs-app"
  5. Delete the template file created by the CLI, since we already have a config file at ./nuon/nuon.aws-ecs-app.toml.
  6. In the ./nuon directory run nuon apps sync --file=nuon.aws-ecs-app.toml.
  7. Run nuon apps select to select the app you just created.

The app is now ready to be deployed to a cloud account.

  1. Log into an AWS account.
  2. Go the ./installer directory.
  3. Copy the .env.local.sample to .env.local.
  4. Update the env vars in .env.local with the IDs from your ~/.nuon file.
  5. Run npm run dev to start the installer.
  6. Navigate to the localhost URL that is logged to the terminal.
  7. Follow the steps in the UI to create an install of the app. Do this as many times as you would like to create multiple installs.

Once you have a running install, you can make updates to it.

  1. Create a branch and make some changes to the source code, the Nuon config, or both.
  2. Commit and open a pull request. This will trigger PR checks to test and validate the code.
  3. Merge your PR. Github Actions will sync the config files, create new builds, and update all of your installs.