Giter Site home page Giter Site logo

steigr / kubyapp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from getkuby/kubyapp

0.0 1.0 0.0 712 KB

A test Rails app that includes all the Kuby gems as git submodules. Facilitates development of the Kuby gem ecosystem.

Ruby 80.71% JavaScript 7.17% CSS 1.35% HTML 10.77%

kubyapp's Introduction

KubyApp

A test Rails app that includes all the Kuby gems as git submodules. Facilitates development of the Kuby gem ecosystem.

Setup

  1. Check out submodules:

    git submodule update --init --recursive
  2. Install dependencies:

    bundle install

Running Locally

  1. Make sure you have Docker installed. If you're running MacOS or Windows, the easiest way is to download Docker Desktop.

  2. Make sure you have minikube running. Docker Desktop makes this easy: Preferences -> Kubernetes -> Enable Kubernetes.

  3. Set things up:

    bundle exec rake kuby:setup
  4. Build the Docker image locally:

    bundle exec rake kuby:build
  5. Deploy:

    bundle exec rake kuby:deploy
  6. Visit http://localhost:8080 to make sure it's working.

Running on DigitalOcean

  1. Create a Gitlab repo in order use the associated container registry.

  2. Create a personal Gitlab access token: https://gitlab.com/profile/personal_access_tokens.

  3. Create a DigitalOcean account and launch a Kubernetes cluster using the dashboard.

  4. Create a .env file with the following variables:

    KUBYAPP_DOCKER_USERNAME="???"
    KUBYAPP_DOCKER_PASSWORD="???"
    KUBYAPP_DOCKER_EMAIL="???"
    KUBYAPP_DIGITALOCEAN_ACCESS_TOKEN="???"
    KUBYAPP_DIGITALOCEAN_CLUSTER_ID="???"
    

    The Docker password should be the personal Gitlab access token you created.

  5. Build and push the Docker image:

    bundle exec rake kuby:build kuby:push
  6. Change the provider in config/initializers/kuby.rb:

    provider :digitalocean do
      access_token ENV['KUBYAPP_DIGITALOCEAN_ACCESS_TOKEN']
      cluster_id ENV['KUBYAPP_DIGITALOCEAN_CLUSTER_ID']
    end
  7. Set things up:

    bundle exec rake kuby:setup
  8. Deploy:

    bundle exec rake kuby:deploy
  9. The deploy should automatically create a DigitalOcean load balancer. Find it in the dashboard and visit its IP address. You should see the Rails app running.

kubyapp's People

Contributors

camertron avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.