Configuration

bit-ship.yml

is a configuration file that allows you to customize your Bit-Ship environment.

version

  • type: string
  • default: 1.0

The version of the configuration file. The current version is 1.0.


name

  • type: string
  • default: ''

Name of your project.


images

  • type: Image
  • default: {}

image section is generated based on the analysis of your app. It contains the Docker image that will be used to run your app. You can change the image to a different one if you want to use a different base image.

image.d.ts
// Names of supported tools https://www.bit-ship.dev/tools
import {ToolsNames} from "../shared";

export interface Image {
  name: string,
  dependencies?: {
    [key in ToolsNames]?: string
  }
}

tasks

  • type: Task
  • default: {}

The tasks section allows you to define reusable scripts.

Type definition:

task.d.ts
export interface Task {
  // Command to be run
  script: string,
  // location in which the command will be run
  location?: string,
  // Environment variables to be set
  env? : {
    [key: string]: string
  }
  volumes?: string[]
}

jobs

  • type: Job
  • default: {}

Jobs are sequences of tasks that can be run manually or hooked to a triggers.

Type definition:

job.d.ts
export interface Job {
  // Automatic job trigger
  on: {
    commit?: {
      on:  'pre-commit' | 'post-commit'
    },
  },
  // name of the task to be run
  tasks: Array<string | string[]>
}

apps

  • type: App
  • default: {}

Apps are tasks that serves FE assets or run BE applications. You can use it to run a web server, a database or other network applications.

app.d.ts
export interface App {
  // Name of task to be run
  task: string
  // Expose ports for the app
  expose: Expose[]
}

interface Expose {
  // URL under which your app will be available locally on your machine
  localHost?: string
  // Port where the app runs
  port?: number
  // Access sets the bit-ship network access
  // - public: app port is exposed to host machine for example localhost:8080
  // - proxy-public: app expose port only for the proxy server that runs under the host machine localhost:80
  access? : 'public' | 'proxy-public'
}

vaults

to be implemented