docker: build cabana from source

pull/4/head
Cameron Clough 2022-03-21 15:27:22 +00:00
parent 3bfe3b06b4
commit 530220a8e4
No known key found for this signature in database
GPG Key ID: BFB3B74B026ED43F
48 changed files with 16 additions and 2889 deletions

View File

@ -1,15 +1,27 @@
FROM node:16-alpine
FROM node:16-alpine AS cabana
RUN apk update && \
apk add --no-cache git
RUN git clone https://github.com/RetroPilot/cabana.git
WORKDIR /cabana
RUN yarn install && \
yarn netlify-sass && \
yarn build
FROM node:16-alpine AS server
# Create app directory
WORKDIR /app
# Install app dependencies
COPY package*.json ./
RUN npm ci
# Bundle app source
COPY . .
RUN npm run build
COPY --from=cabana /cabana/build cabana
EXPOSE 3000
CMD ["npm", "run", "server"]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +0,0 @@
/ /index.html 200
/cabana/:slug /:slug 200
/cabana/* /:splat 200
/cabana/:a/:b /:a/:b 200
/cabana/:a/:b/:c /:a/:b/:c 200

View File

@ -1,26 +0,0 @@
{
"files": {
"main.css": "/cabana/static/css/main.9ce31ab0.chunk.css",
"main.js": "/cabana/static/js/main.f2e8c285.chunk.js",
"main.js.map": "/cabana/static/js/main.f2e8c285.chunk.js.map",
"runtime-main.js": "/cabana/static/js/runtime-main.ec09f551.js",
"runtime-main.js.map": "/cabana/static/js/runtime-main.ec09f551.js.map",
"static/js/2.a84bf109.chunk.js": "/cabana/static/js/2.a84bf109.chunk.js",
"static/js/2.a84bf109.chunk.js.map": "/cabana/static/js/2.a84bf109.chunk.js.map",
"66fe2b555037a721fc00.worker.js": "/cabana/66fe2b555037a721fc00.worker.js",
"66fe2b555037a721fc00.worker.js.map": "/cabana/66fe2b555037a721fc00.worker.js.map",
"83feda798dbec03978d2.worker.js": "/cabana/83feda798dbec03978d2.worker.js",
"83feda798dbec03978d2.worker.js.map": "/cabana/83feda798dbec03978d2.worker.js.map",
"beaf0312537cf2a84ceb.worker.js": "/cabana/beaf0312537cf2a84ceb.worker.js",
"beaf0312537cf2a84ceb.worker.js.map": "/cabana/beaf0312537cf2a84ceb.worker.js.map",
"c7de2d6e38fac0f21bad.worker.js": "/cabana/c7de2d6e38fac0f21bad.worker.js",
"c7de2d6e38fac0f21bad.worker.js.map": "/cabana/c7de2d6e38fac0f21bad.worker.js.map",
"index.html": "/cabana/index.html",
"precache-manifest.7ab2e72527a3cdc916818b082c270c5b.js": "/cabana/precache-manifest.7ab2e72527a3cdc916818b082c270c5b.js",
"service-worker.js": "/cabana/service-worker.js",
"static/css/main.9ce31ab0.chunk.css.map": "/cabana/static/css/main.9ce31ab0.chunk.css.map",
"static/media/index.css": "/cabana/static/media/fontawesome-webfont.fee66e71.woff",
"static/media/webusb-enable-experimental-features.png": "/cabana/static/media/webusb-enable-experimental-features.e5a08e76.png",
"static/media/webusb-enable-webusb.png": "/cabana/static/media/webusb-enable-webusb.aceef6a0.png"
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 B

View File

@ -1,4 +0,0 @@
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z"/>
</svg>

Before

Width:  |  Height:  |  Size: 259 B

View File

@ -1,4 +0,0 @@
<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z"/>
</svg>

Before

Width:  |  Height:  |  Size: 259 B

View File

@ -1,4 +0,0 @@
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M9 16h2V8H9v8zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm1-4h2V8h-2v8z"/>
</svg>

Before

Width:  |  Height:  |  Size: 316 B

View File

@ -1,4 +0,0 @@
<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M9 16h2V8H9v8zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm1-4h2V8h-2v8z"/>
</svg>

Before

Width:  |  Height:  |  Size: 316 B

View File

@ -1,4 +0,0 @@
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z"/>
</svg>

Before

Width:  |  Height:  |  Size: 254 B

View File

@ -1,4 +0,0 @@
<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z"/>
</svg>

Before

Width:  |  Height:  |  Size: 254 B

View File

@ -1,4 +0,0 @@
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M10 16.5l6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
</svg>

Before

Width:  |  Height:  |  Size: 311 B

View File

@ -1,4 +0,0 @@
<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M10 16.5l6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
</svg>

Before

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

View File

@ -1 +0,0 @@
<svg width='120px' height='120px' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="uil-default"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#c9c9c9' transform='rotate(0 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-1s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#c9c9c9' transform='rotate(30 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.9166666666666666s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#c9c9c9' transform='rotate(60 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.8333333333333334s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#c9c9c9' transform='rotate(90 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.75s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#c9c9c9' transform='rotate(120 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.6666666666666666s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#c9c9c9' transform='rotate(150 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.5833333333333334s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#c9c9c9' transform='rotate(180 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.5s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#c9c9c9' transform='rotate(210 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.4166666666666667s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#c9c9c9' transform='rotate(240 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.3333333333333333s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#c9c9c9' transform='rotate(270 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.25s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#c9c9c9' transform='rotate(300 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.16666666666666666s' repeatCount='indefinite'/></rect><rect x='46.5' y='40' width='7' height='20' rx='5' ry='5' fill='#c9c9c9' transform='rotate(330 50 50) translate(0 -30)'> <animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.08333333333333333s' repeatCount='indefinite'/></rect></svg>

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 KiB

View File

@ -1 +0,0 @@
<!doctype html><html lang="en"><head><script async src="https://www.googletagmanager.com/gtag/js?id=UA-80079182-4"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","UA-80079182-4")</script><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="/cabana/manifest.json"><link rel="shortcut icon" href="/cabana/favicon.ico"><title>comma.ai cabana</title><link href="/cabana/static/css/main.9ce31ab0.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(p){function e(e){for(var r,t,n=e[0],o=e[1],u=e[2],a=0,l=[];a<n.length;a++)t=n[a],Object.prototype.hasOwnProperty.call(f,t)&&f[t]&&l.push(f[t][0]),f[t]=0;for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(p[r]=o[r]);for(s&&s(e);l.length;)l.shift()();return i.push.apply(i,u||[]),c()}function c(){for(var e,r=0;r<i.length;r++){for(var t=i[r],n=!0,o=1;o<t.length;o++){var u=t[o];0!==f[u]&&(n=!1)}n&&(i.splice(r--,1),e=a(a.s=t[0]))}return e}var t={},f={1:0},i=[];function a(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return p[e].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=p,a.c=t,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(r,e){if(1&e&&(r=a(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)a.d(t,n,function(e){return r[e]}.bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="/cabana/";var r=this["webpackJsonpcan-explorer"]=this["webpackJsonpcan-explorer"]||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var o=0;o<r.length;o++)e(r[o]);var s=n;c()}([])</script><script src="/cabana/static/js/2.a84bf109.chunk.js"></script><script src="/cabana/static/js/main.f2e8c285.chunk.js"></script></body></html>

View File

@ -1,15 +0,0 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": "./index.html",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}

View File

@ -1,66 +0,0 @@
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "60f8f0964ed39bfd3301fa281365e8f8",
"url": "/cabana/66fe2b555037a721fc00.worker.js"
},
{
"revision": "5263d7ebb65cbb7f63d668004b749354",
"url": "/cabana/83feda798dbec03978d2.worker.js"
},
{
"revision": "c19f702f1fdd6d7de9d66420f6a72108",
"url": "/cabana/beaf0312537cf2a84ceb.worker.js"
},
{
"revision": "577d1edb072c0a0e3f2b69189ab30a39",
"url": "/cabana/c7de2d6e38fac0f21bad.worker.js"
},
{
"revision": "b7691e7cf7951f4074e7bf894da76c95",
"url": "/cabana/index.html"
},
{
"revision": "0a09c9598696523c1957",
"url": "/cabana/static/css/main.9ce31ab0.chunk.css"
},
{
"revision": "87a6424224b85c397433",
"url": "/cabana/static/js/2.a84bf109.chunk.js"
},
{
"revision": "0a09c9598696523c1957",
"url": "/cabana/static/js/main.f2e8c285.chunk.js"
},
{
"revision": "f7f907c00ca18da482e8",
"url": "/cabana/static/js/runtime-main.ec09f551.js"
},
{
"revision": "674f50d287a8c48dc19ba404d20fe713",
"url": "/cabana/static/media/fontawesome-webfont.674f50d2.eot"
},
{
"revision": "912ec66d7572ff821749319396470bde",
"url": "/cabana/static/media/fontawesome-webfont.912ec66d.svg"
},
{
"revision": "af7ae505a9eed503f8b8e6982036873e",
"url": "/cabana/static/media/fontawesome-webfont.af7ae505.woff2"
},
{
"revision": "b06871f281fee6b241d60582ae9369b9",
"url": "/cabana/static/media/fontawesome-webfont.b06871f2.ttf"
},
{
"revision": "fee66e712a8a08eef5805a46892932ad",
"url": "/cabana/static/media/fontawesome-webfont.fee66e71.woff"
},
{
"revision": "e5a08e76f61c8ef370034956eb5865e1",
"url": "/cabana/static/media/webusb-enable-experimental-features.e5a08e76.png"
},
{
"revision": "aceef6a08425cf752843a9dabd208c56",
"url": "/cabana/static/media/webusb-enable-webusb.aceef6a0.png"
}
]);

View File

@ -1,39 +0,0 @@
/**
* Welcome to your Workbox-powered service worker!
*
* You'll need to register this file in your web app and you should
* disable HTTP caching for this file too.
* See https://goo.gl/nhQhGp
*
* The rest of the code is auto-generated. Please don't update this file
* directly; instead, make changes to your Workbox build configuration
* and re-run your build process.
* See https://goo.gl/2aRDsh
*/
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
importScripts(
"/cabana/precache-manifest.7ab2e72527a3cdc916818b082c270c5b.js"
);
self.addEventListener('message', (event) => {
if (event.data && event.data.type === 'SKIP_WAITING') {
self.skipWaiting();
}
});
workbox.core.clientsClaim();
/**
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
* requests for URLs in the manifest.
* See https://goo.gl/S9QRab
*/
self.__precacheManifest = [].concat(self.__precacheManifest || []);
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/cabana/index.html"), {
blacklist: [/^\/_/,/\/[^\/?]+\.[^\/]+$/],
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +0,0 @@
!function(e){function webpackJsonpCallback(r){for(var n,a,o=r[0],c=r[1],p=r[2],i=0,l=[];i<o.length;i++)a=o[i],Object.prototype.hasOwnProperty.call(_,a)&&_[a]&&l.push(_[a][0]),_[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(u&&u(r);l.length;)l.shift()();return t.push.apply(t,p||[]),checkDeferredModules()}function checkDeferredModules(){for(var e,r=0;r<t.length;r++){for(var n=t[r],a=!0,o=1;o<n.length;o++){var u=n[o];0!==_[u]&&(a=!1)}a&&(t.splice(r--,1),e=__webpack_require__(__webpack_require__.s=n[0]))}return e}var r={},_={1:0},t=[];function __webpack_require__(_){if(r[_])return r[_].exports;var t=r[_]={i:_,l:!1,exports:{}};return e[_].call(t.exports,t,t.exports,__webpack_require__),t.l=!0,t.exports}__webpack_require__.m=e,__webpack_require__.c=r,__webpack_require__.d=function(e,r,_){__webpack_require__.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:_})},__webpack_require__.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,r){if(1&r&&(e=__webpack_require__(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var _=Object.create(null);if(__webpack_require__.r(_),Object.defineProperty(_,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var t in e)__webpack_require__.d(_,t,function(r){return e[r]}.bind(null,t));return _},__webpack_require__.n=function(e){var r=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};return __webpack_require__.d(r,"a",r),r},__webpack_require__.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},__webpack_require__.p="/cabana/";var n=this["webpackJsonpcan-explorer"]=this["webpackJsonpcan-explorer"]||[],a=n.push.bind(n);n.push=webpackJsonpCallback,n=n.slice();for(var o=0;o<n.length;o++)webpackJsonpCallback(n[o]);var u=a;checkDeferredModules()}([]);
//# sourceMappingURL=runtime-main.ec09f551.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB