Last active
March 22, 2019 01:45
-
-
Save sync/f606de74515bf639c53c46d38904e16f to your computer and use it in GitHub Desktop.
Example docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[@bs.config {jsx: 3}]; | |
type route = | |
| Home | |
| More; | |
let mapPathToRoute = (path: list(string)) => | |
switch (path) { | |
| [] => Home | |
| ["more"] => More | |
| _ => Home | |
}; | |
[@react.component] | |
let make = () => { | |
let url = ReasonReactRouter.useUrl(); | |
<div> | |
<main> | |
{switch (url.path |> mapPathToRoute) { | |
| Home => <Home /> | |
| More => <More /> | |
}} | |
</main> | |
</div>; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "pennyworth", | |
"bsc-flags": ["-bs-no-version-header", "-bs-super-errors"], | |
"ppx-flags": ["./node_modules/.bin/reactjs_jsx_ppx_v3.exe"], | |
"namespace": true, | |
"bs-dependencies": ["reason-react"], | |
"sources": [ | |
{ | |
"dir": "app", | |
"subdirs": true | |
}, | |
{ | |
"dir": "server", | |
"subdirs": true | |
} | |
], | |
"package-specs": { | |
"module": "es6", | |
"in-source": true | |
}, | |
"suffix": ".bs.js", | |
"refmt": 3 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:8 | |
RUN apt-get update && apt-get install -y wget --no-install-recommends \ | |
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ | |
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ | |
&& apt-get update \ | |
&& apt-get -y install procps \ | |
&& apt-get -y install util-linux \ | |
&& apt-get -y install curl \ | |
&& apt-get -y install build-essential \ | |
&& apt-get -y install git \ | |
&& apt-get install -y google-chrome-unstable \ | |
--no-install-recommends | |
RUN npm install -g yarn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment