GithubHelp home page GithubHelp logo

kearfy / nanoforge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nanoservicesforge/nanoforge

0.0 0.0 0.0 21 KB

Build and runner tool for nanoservices

License: BSD 2-Clause "Simplified" License

Shell 4.81% Rust 95.19%

nanoforge's Introduction

NanoForge

Build and runner tool for nanoservices

Installation

We want to work on packaging for operating systems later but for now you can install using the following command:

wget -qO- https://raw.githubusercontent.com/nanoservicesforge/NanoForge/main/scripts/install.sh | sh

Usage

Before we can use NanoForge we need to package a nanoservice and build it using scratch as seen below:

FROM scratch

COPY ./your_package .

Declaring a nanoservice in your build

And this is enough to package your nanoservice in a Docker image. Now we move onto declaring our nanoservice in our Cargo.toml with the following (nan-one is a real toy example of a nanoservice on Docker Hub):

[nanoservices.nan-one]
dev_image = "maxwellflitton/nan-one"
prod_image = "maxwellflitton/nan-one"
entrypoint = "."

Preparing your build

Now we can prepare our build using the following command (you pwd should be the root of your project):

nanoforge prep

This command will create a .nanoservices_cache and pull the Docker image unpacking the files into the cache. The build tool will then scan all subdirectories looking for nanoservices in all the Cargo.toml files in the project. The relative path will then be calculated for each nanoservice and defined in the Cargo.toml files. For instance, our nan-one nanoservice will have the following path:

[dependencies.nan-one]
path = "../.nanoservices_cache/domain_services/nanoservices/maxwellflitton_nan-one/."

You can then use this in your build.

nanoforge's People

Contributors

maxwellflitton 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.