Skip to content

Commit

Permalink
feat(deployment): Add new docker support.
Browse files Browse the repository at this point in the history
Add Docker support (and docker-compose)
  • Loading branch information
migueravila authored Mar 18, 2022
2 parents cf4e42f + 0e2fe47 commit 141a1a5
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM nginx
COPY . /usr/share/nginx/html

15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- [πŸš€ Usage](#-usage)
- [🏑 As Home Page](#-as-home-page)
- [βž• As New Tab](#-as-new-tab)
- [🐬 In a Docker Container](#-in-a-docker-container)
- [🎨 Customization](#-customization)
- [πŸ‘‹ General: Name, Image Background and Greetings](#-general-name-image-background-and-greetings)
- [πŸ“ Layouts: Bento, Lists and Buttons.](#-layouts-bento-lists-and-buttons)
Expand Down Expand Up @@ -57,6 +58,20 @@ You can use different Add-ons/Extensions for it
- If you use Firefox: [Custom New Tab Page](https://addons.mozilla.org/en-US/firefox/addon/custom-new-tab-page/?src=search) and make sure you enable "Force links to open in the top frame (experimental)" in the extension's preferences page.
- If you use Chromium (Brave, Vivaldi, Chrome): [Custom New Tab URL](https://chrome.google.com/webstore/detail/custom-new-tab-url/mmjbdbjnoablegbkcklggeknkfcjkjia)

### 🐬 In a Docker Container

You can run Bento in a Docker Container, either with `docker run`, or with the included `docker-compose` file.

#### Docker run
1. Clone this repo to pull the config.js file: `git clone https://github.com/migueravila/Bento/`
2. Run the following `docker` command, providing the path to the config.js file, changing port mappings if needed.
3. `# docker run -it -d -p 80:80 -v <config.js location>:/usr/share/nginx/html/config.js lewisdoesstuff/bento`

#### docker-compose
1. Clone this repo with `git clone https://github.com/migueravila/Bento/`
2. Edit port mappings, and provide a path to the config.js file in `docker-compose.yml`
3. `cd` into the cloned repo, then run `# docker-compose -d up` to start.

## 🎨 Customization

All customization can be managed in the `config.js` file:
Expand Down
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: "3.9"

services:
bento:
image: lewisdoesstuff/bento
volumes:
# Append Bento config location to below line.
- /config.js:/usr/share/nginx/html/config.js
ports:
# Replace host port 80 (left side) with desired port.
- 80:80


0 comments on commit 141a1a5

Please sign in to comment.