Git Product home page Git Product logo

caravel's Introduction






Caravel: Deliver simple things, with simplicity.

Caravel is a tool (still in early development) to help devs publish and update code at production servers.

The idea is simple: Small projects (such as simple Node apps or static websites) doesn't consume lot's of resources in order to build. So instead of hiring CI/CD paid plans or wasting time building robust config stacks, devs can make use of their own VPS to build and publish updates.

Installation

As of today Caravel only supports being compiled from source. In the future, binaries will be released for Linux.

Make sure you have git, SQLite and Crystal.

Installing git and SQLite (Ubuntu):

apt-get install git-core sqlite3 

Installing Crystal (Ubuntu):

curl -sSL https://dist.crystal-lang.org/apt/setup.sh | sudo bash

And then:

sudo apt install crystal

If you face any issues, please read this guide.

Then you can build the project:

cd caravel/
crystal build src/caravel
sudo cp ./caravel /usr/local/bin

Now you can check if Caravel is available by running:

caravel help

Usage

In order to use Caravel you first need a recipe file.

Recipes

Caravel always looks for a caravel.yml file when run on a directory.

Here is a minimal example of a config file (also called recipe):

name: your-repo
repo: [email protected]:you/your-repo
trigger: tag
run:
  - npm install
  - npm run build
  - cp -R dist /www/var/html/

Once you have a recipe, you can call Caravel with the command:

caravel start

More details on recipes soon.


This README is still in work.

caravel's People

Contributors

kazzkiq avatar felipeuntill avatar

Stargazers

Miguel Modesto avatar  avatar Caio Leitão avatar rsteei avatar Jhony Alceu Pereira avatar Renato Gonçalves Vieira avatar José Cage  avatar Jorge Roberto Tomaz Junior avatar Jéssica  avatar Victor Miguez avatar  avatar William Oliveira avatar Ronaldo Cesar Paggi avatar Leonardo Goulart avatar James Meneses avatar Fernando Daciuk avatar Lucas Bento avatar

Watchers

 avatar James Cloos avatar Leonardo Goulart avatar James Meneses avatar

Forkers

lsgoulart

caravel's Issues

Enable watch time interval

Now Caravel is set by default to check for changes in repo every 30 seconds. It would be interesting to enable user setting it by itself on caravel.json. E.g.

// caravel.json
{
    "name": "My package",
    "repo": "https://git-blabla/my-package.git",
    "watchInterval": 60000      // Would check every 60 seconds
}

Enable Caravel for secured repositories

Repositories using SSH keys or passwords are not supported yet (and thats bad).

Password:
These repos end up prompting for user password. But as Node runs the git clone command indirectly (through Caravel), the prompt never shows to the user. No password typed, Caravel can't carry on. Caravel uses commander for CLI so perhaps we would need to dig a little more on its API.

SSH keys:
To be honest I don't know how this work and have no experience with repos using SSH keys. It seems that it could be solved outside Caravel (User must register a key on their local files and it gets activated automatically when needed). But I'm really not sure. Perhaps, if this isn't an issue for the project itself, we could still add a section to the website explaining how to do it.


TODO:

  • Enable Caravel for Passwords
  • Enable Caravel for SSH

Enable Caravel:status to run on custom ports

When you run caravel watch a webserver is automatically lifted up on port 7007. But if this port is already being used on one's server, there should be an option to choose another one. E.g.:

$ caravel watch -p 5555
# Would start server at port 5555

Replace callbacks by ES6 Promises

There are some pieces of code which started to fall into the callback hell hole.

Instead of solving this with solutions such as modularizing each piece of code, I'm willing to make use of ES6 Iterators/Generators to make the code more readable.

So this (simple case, there are worse samples on Caravel.js file):

installDependenciesAndBuildAndWatch (self) {
    DataLogger.insertLog('running')
    self.isRunning = true
    self.installDependencies(() => {
      self.build(() => {
        self.watch(self)
      })
    })
  }

Could turn into something like this:

* installDependenciesAndBuildAndWatch () {
    DataLogger.insertLog('running')
    this.isRunning = true

    yield this.installDependencies()
    yield this.build()
    yield this.watch(this)
  }

Enable watch without re-installing dependencies

Today every time Caravel detects a change on a repository, the following steps are made:

  1. Clone repo again;
  2. Re-install npm dependencies all over; (sloooow)
  3. Run tasks defined on caravel.json;
  4. Deploy app.

The second step generally take a lot of time, and not all changes need npm dependencies reinstalled. So a better approach would be running npm install only if needed (only when changes into package.json are detected).

Are someone using?

Are someone currently using caravel in production? i think that is a really good idea but i found soo many missing features to be a production ready project.
What the project administrators thinks about it and what you guys intend with the project.

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.