├── .eslintrc
├── .gitignore
├── LICENCE.md
├── README.md
├── docs
├── .nojekyll
├── 0e021f12d426d36ff02a3e9001e29ec7.jpg
├── 12290a44ad51b2ff2c5edc8ef538e2dd.jpg
├── 1ea04a16928be0b78fd8f78d49107fb6.jpg
├── avatar.png
├── build.html
├── d69ae1e0d46bcf466774294e59378a37.jpg
├── err.html
├── index.html
└── static
│ ├── css
│ ├── app.8f0b8c01.css
│ └── app.8f0b8c01.css.map
│ └── js
│ ├── 0.9f0bc0a3.chunk.js
│ ├── 0.9f0bc0a3.chunk.js.map
│ ├── app.0e732cc4.js
│ ├── app.0e732cc4.js.map
│ ├── manifest.063c8024.js
│ ├── manifest.063c8024.js.map
│ ├── vendor.b4b3e991.js
│ └── vendor.b4b3e991.js.map
├── example
├── .babelrc
├── .dockerignore
├── .eslintrc
├── Dockerfile
├── assets
│ ├── avatar-favicon.sketch
│ ├── avatar.sketch
│ ├── images
│ │ ├── 0.jpg
│ │ ├── 1.jpg
│ │ ├── 2.jpg
│ │ ├── 3.jpg
│ │ └── avatar.svg
│ └── replays
│ │ ├── build.txt
│ │ └── err.txt
├── config
│ ├── .webpack-records.json
│ ├── babel.dev.js
│ ├── babel.prod.js
│ ├── paths.js
│ ├── template
│ │ ├── avatar.png
│ │ └── index.html
│ ├── webpack.config.dev.babel.js
│ └── webpack.config.production.babel.js
├── package.json
├── server
│ ├── index.js
│ ├── package.json
│ └── yarn.lock
├── src
│ ├── App.js
│ ├── Carusel.js
│ ├── Container.js
│ ├── Content.js
│ ├── Layout.js
│ ├── Replay.js
│ ├── Term.js
│ ├── __tests__
│ │ └── dev.js
│ ├── carusel.sass
│ ├── container.sass
│ ├── content.sass
│ ├── enhancers
│ │ ├── AsyncMatch.js
│ │ └── MatchWithProps.js
│ ├── layout.sass
│ ├── main.js
│ ├── main.sass
│ ├── reducer.js
│ ├── replay.sass
│ └── utils
│ │ ├── colors.js
│ │ ├── defaultConfig.js
│ │ ├── hterm.js
│ │ └── runes.js
└── yarn.lock
├── ideas.md
├── lerna.json
├── package.json
└── packages
├── pbl
├── README.md
├── index.js
├── lib
│ └── cfg.js
├── package.json
└── scripts
│ └── run.sh
├── pbls
├── README.md
├── index.js
├── lib
│ └── cfg.js
├── package.json
└── scripts
│ ├── clean.sh
│ ├── install.sh
│ └── run.sh
├── pty64
├── README.md
├── index.js
└── package.json
└── stdind
├── .babelrc
├── .dockerignore
├── .eslintrc
├── Dockerfile
├── LICENSE-3RD-PARTY.md
├── README.md
├── config
├── babel.dev.js
├── babel.prod.js
├── paths.js
├── template
│ ├── avatar.png
│ └── index.html
├── webpack.config.dev.babel.js
└── webpack.config.production.babel.js
├── example.gif
├── examples
└── longRunning.js
├── images
└── avatar.svg
├── package.json
├── server
├── index.js
├── package.json
└── yarn.lock
├── src
├── App.js
├── Container.js
├── Layout.js
├── Term.js
├── __tests__
│ └── dev.js
├── container.sass
├── enhancers
│ └── MatchWithProps.js
├── layout.sass
├── main.js
├── main.sass
├── reducer.js
└── utils
│ ├── colors.js
│ ├── defaultConfig.js
│ ├── hterm.js
│ └── runes.js
└── yarn.lock
/.eslintrc:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "extends": "airbnb",
4 | "parser": "babel-eslint",
5 | "env": {
6 | "browser": true,
7 | "mocha": true,
8 | "node": true
9 | },
10 | "rules": {
11 | "no-nested-ternary": 0,
12 | "react/prop-types": 0,
13 | "react/jsx-filename-extension": 0,
14 | "no-sequences": 1,
15 | "comma-dangle": 0,
16 | },
17 | "globals": {
18 | "ReactElement": false
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 | node_modules
3 | npm-debug.log
4 | lerna-debug.log
5 |
--------------------------------------------------------------------------------
/LICENCE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # pbl
2 |
3 | `pbl` gives users the ability to make fast and easy deployment of their Docker powered applications and services onto their server.
4 | Any directory that contains a Dockerfile can be deployed with just one command: `pbl`.
5 |
6 | Every time a user deploys a project, `pbl` (by default), will immediately
7 | provide a new unique URL.
8 | While the build process runs, a full-featured, view-only terminal with all the build
9 | process output will be available at the provided URL.
10 |
11 | If the build process is successful, the app itself will become available at the same URL, otherwise the terminal with the build process output and error(s) will remain available.
12 |
13 | ## Client install
14 |
15 | ### Prerequisites
16 |
17 | To make pbl work, nodejs needs to be installed on the client machine.
18 |
19 | ### Install
20 |
21 | ```bash
22 | npm install -g pbl
23 | pbl init --identity {SSH-IDENTITY-FILE-PATH} --server {USER@YOUR-SERVER-HOST-OR-IP}
24 | # example: pbl init --identity ~/.ssh/mykey.pem --server ubuntu@ui.revue.io
25 | ```
26 |
27 | PS: For node projects, there is no need to setup `pbl` globally,
28 | and it can be installed into devDependencies of a project.
29 |
30 | ## Server install
31 |
32 | ### Prerequisites
33 |
34 | Docker + Node LTS + build-essential (make) + python,
35 | you need to own domain name (or just use `/etc/hosts`),
36 | and have a DNS record for third (in some cases fourth) level pointing to your server.
37 |
38 | I highly recommend you to use overlay2 for docker storage driver, because of this issue
39 | https://github.com/docker/docker/issues/10613
40 |
41 | ### Install
42 |
43 | ```bash
44 | npm install -g pbls
45 | pbls init --domain {YOUR DOMAIN}
46 | # example: pbls init --domain ui.revue.io
47 | # as I want to publish all content under fourth level domain
48 | ```
49 |
50 | ## Usage Example
51 |
52 | Clone current project.
53 |
54 | Open `example` dir and run `pbl`, project will be published at `{rnd}.{YOUR DOMAIN}` host.
55 |
56 | Run `pbl --name hello` then the project will be published at `hello.{YOUR DOMAIN}` host.
57 |
58 | To use dockerfile with other name than `Dockerfile` just run as `pbl --dockerFile ./DockerfileOther`
59 |
60 | By default `pbl` runs deploys in detached mode, and exits almost immediately after running,
61 | but sometimes if you need more control you can run `pbl` in `attached` mode,
62 | just add `--attached true`
63 |
64 | To pass ARGs to Docker build, just append `--build-arg` like
65 | `pbl --name hello --build-arg PARAM=LALA`
66 |
67 | ## Server cleanup
68 |
69 | As most of the time all these containers are no longer needed after a few days, just add the following command into `cron`:
70 |
71 | ```bash
72 | pbls clean --days {X}
73 | ```
74 |
75 | This command will stop all containers that were started before `current date` - `{X}` days, and will also clean all exited containers.
76 |
77 | For full cleanup run:
78 |
79 | ```bash
80 | pbls clean --days 0
81 | ```
82 |
83 | ## Contribute
84 |
85 | To use locally:
86 |
87 | * `npm install`
88 |
89 | * add `127.0.0.1 *.localhost` to `/etc/hosts`,
90 |
91 | * initialize `pbls` by running it directly as `./packages/pbls/index.js init --domain localhost`
92 |
93 | * then `cd` `example` or any Dockerfile folder and run local pbl in dev mode like `../packages/pbl/index.js --mode dev`
94 |
95 | ## TODO
96 |
97 | Add running server output log to some path like `http://{NAME}.{YOUR DOMAIN}/logs`
98 |
--------------------------------------------------------------------------------
/docs/.nojekyll:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/docs/0e021f12d426d36ff02a3e9001e29ec7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/istarkov/pbl/525c604d53a64a00e969b2efb0b96f6ee96df6de/docs/0e021f12d426d36ff02a3e9001e29ec7.jpg
--------------------------------------------------------------------------------
/docs/12290a44ad51b2ff2c5edc8ef538e2dd.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/istarkov/pbl/525c604d53a64a00e969b2efb0b96f6ee96df6de/docs/12290a44ad51b2ff2c5edc8ef538e2dd.jpg
--------------------------------------------------------------------------------
/docs/1ea04a16928be0b78fd8f78d49107fb6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/istarkov/pbl/525c604d53a64a00e969b2efb0b96f6ee96df6de/docs/1ea04a16928be0b78fd8f78d49107fb6.jpg
--------------------------------------------------------------------------------
/docs/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/istarkov/pbl/525c604d53a64a00e969b2efb0b96f6ee96df6de/docs/avatar.png
--------------------------------------------------------------------------------
/docs/build.html:
--------------------------------------------------------------------------------
1 | index.html
--------------------------------------------------------------------------------
/docs/d69ae1e0d46bcf466774294e59378a37.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/istarkov/pbl/525c604d53a64a00e969b2efb0b96f6ee96df6de/docs/d69ae1e0d46bcf466774294e59378a37.jpg
--------------------------------------------------------------------------------
/docs/err.html:
--------------------------------------------------------------------------------
1 | index.html
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |