Skip to content

Commit

Permalink
feat: builder service (shuttle-hq#1244)
Browse files Browse the repository at this point in the history
  • Loading branch information
chesedo authored and iulianbarbu committed Sep 27, 2023
1 parent 631007c commit 9f05cb5
Show file tree
Hide file tree
Showing 19 changed files with 874 additions and 6 deletions.
77 changes: 77 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Expand Up @@ -3,6 +3,7 @@ resolver = "2"
members = [
"admin",
"auth",
"builder",
"cargo-shuttle",
"codegen",
"common",
Expand Down
34 changes: 34 additions & 0 deletions builder/Cargo.toml
@@ -0,0 +1,34 @@
[package]
name = "shuttle-builder"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
async-trait = { workspace = true }
clap = { workspace = true }
flate2 = { workspace = true }
nbuild-core = "0.1.2"
tar = { workspace = true }
tempfile = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["fs", "macros", "io-util", "process", "rt-multi-thread"] }
toml = { workspace = true }
tonic = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true, features = ["default"] }
ulid = { workspace = true }

[dependencies.shuttle-common]
workspace = true
features = ["backend", "tonic"]

[dependencies.shuttle-proto]
workspace = true

[dev-dependencies]
hex = "0.4.3"
portpicker = { workspace = true }
pretty_assertions = { workspace = true }
shuttle-common-tests = { workspace = true }
15 changes: 15 additions & 0 deletions builder/prepare.sh
@@ -0,0 +1,15 @@
#!/usr/bin/env sh

###############################################################################
# This file is used by our common Containerfile incase the container for this #
# service might need some extra preparation steps for its final image #
###############################################################################

# Install the nix package manager
curl -L https://nixos.org/nix/install > ./install.sh
chmod +x install.sh
./install.sh --daemon
rm install.sh

# Activate the nix command
echo "experimental-features = nix-command" >> /etc/nix/nix.conf
15 changes: 15 additions & 0 deletions builder/src/args.rs
@@ -0,0 +1,15 @@
use std::net::SocketAddr;

use clap::Parser;
use tonic::transport::Uri;

#[derive(Parser, Debug)]
pub struct Args {
/// Address to bind to
#[arg(long, default_value = "127.0.0.1:8000")]
pub address: SocketAddr,

/// Address to reach the authentication service at
#[arg(long, default_value = "http://127.0.0.1:8008")]
pub auth_uri: Uri,
}

0 comments on commit 9f05cb5

Please sign in to comment.