Tizen_4.0 base
[platform/upstream/docker-engine.git] / landr.conf.js
1 const fs = require('fs')
2
3 const getArch = (str) => {
4   const [ _, arch ] = str.match(/-([^-]+)\.tar\.gz$/)
5   return arch
6 }
7
8 const packagePrettyName = (str) => `Docker for ${getArch(str)}`
9
10 const prepAssets = (release) => {
11   release.assets = release.assets.map((asset) => {
12     return Object.assign({}, asset, {
13       prettyName: packagePrettyName(asset.name),
14       arch: getArch(asset.name),
15       os: 'Linux'
16     })
17   })
18
19   return release
20 }
21
22 module.exports = {
23   theme: 'landr-theme-basic',
24   hooks: {
25     'post-build': ({ config }) => {
26       const data = fs.readFileSync(`${__dirname}/contrib/install.sh`, 'utf-8')
27       return fs.writeFileSync(`${config.distDir}/install.sh`, data)
28     }
29   },
30   middleware: (store, action, next) => {
31     if (action.type === 'ADD_RELEASE') {
32       // intercept all releases and add pretty labels to assets
33       action.payload = prepAssets(action.payload)
34     }
35
36     return next(action)
37   },
38   settings: {
39     lead: 'A Moby-based container engine for IoT',
40     analytics: {
41       mixpanelToken: '81dd4ca517f8bd50d46aa8fe057882ac',  // mixpanelToken
42       gosquaredId: 'GSN-122115-A', // gosquared Id
43       gaSite: 'balena.io', // google Analytics site eg balena.io
44       gaId: 'UA-45671959-5' // google Analytics ID
45     },
46     theme: {
47       colors: {
48         primary: '#00A375'
49       }
50     },
51     callToActionCommand: 'curl -sfL https://balena.io/install.sh | sh',
52     features: [
53       {
54         'title': 'Small footprint',
55         'image': 'footprint',
56         'description': '3.5x smaller than Docker CE, packaged as a single binary'
57       },
58       {
59         'title': 'Multi-arch support',
60         'image': 'multiple',
61         'description': 'Available for a wide variety of chipset architectures, supporting everything from tiny IoT devices to large industrial gateways'
62       },
63       {
64         'title': 'True container deltas',
65         'image': 'bandwidth',
66         'description': 'Bandwidth-efficient updates with binary diffs, 10-70x smaller than pulling layers in <a href="https://resin.io/blog/announcing-balena-a-moby-based-container-engine-for-iot/#technical_comparison" target="_blank">common scenarios</a>'
67       },
68       {
69         'title': 'Minimal wear-and-tear',
70         'image': 'storage',
71         'description': 'Extract layers as they arrive to prevent excessive writing to disk, protecting your storage from eventual corruption'
72       },
73       {
74         'title': 'Failure-resistant pulls',
75         'image': 'failure-resistant',
76         'description': 'Atomic and durable image pulls defend against partial container pulls in the event of power failure'
77       },
78       {
79         'title': 'Conservative memory use',
80         'image': 'undisturbed',
81         'description': 'Prevents page cache thrashing during image pull, so your application runs undisturbed in low-memory situations'
82       }
83     ],
84     motivation: [
85       'Balena is a new container engine purpose-built for embedded and IoT use cases and compatible with Docker containers. </br></br>Based on Docker’s Moby Project, balena supports container deltas for 10-70x more efficient bandwidth usage, has 3.5x smaller binaries, uses RAM and storage more conservatively, and focuses on atomicity and durability of container pulling.</br></br>Read more in our <a href="https://resin.io/blog/announcing-balena-a-moby-based-container-engine-for-iot" target="_blank">blog post</a>.'
86     ],
87   }
88 }