From 25544e562a26eb79cd4f63cde6715ab6f93f187a Mon Sep 17 00:00:00 2001 From: Lewis Wood Date: Mon, 14 Mar 2022 20:00:59 +0000 Subject: [PATCH 1/3] Added Dockerfile and docker-compose.yml for Docker support Added a Dockerfile to support building and running the application as an Nginx Docker container. Added docker-compose.yml as well to support launching as a stack. --- Dockerfile | 3 +++ README.md | 15 +++++++++++++++ docker-compose.yml | 13 +++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..bf69e1949 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM nginx +COPY . /usr/share/nginx/html + diff --git a/README.md b/README.md index aca2dd36d..9f1f5889f 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 :/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: diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..fd33db907 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +version: "3.9" + +services: + bento: + image: 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 + + From 392da57c6b58e6b96e1c07cdb51fb710d521075d Mon Sep 17 00:00:00 2001 From: Lewis Wood Date: Mon, 14 Mar 2022 20:06:13 +0000 Subject: [PATCH 2/3] Fixed 'autochanbe' typo in Readme.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f1f5889f..1ea9e608f 100644 --- a/README.md +++ b/README.md @@ -269,7 +269,7 @@ that you can change in the `config.js` file: // Autochange autoChangeTheme: true, - // Autochabge by OS + // Autochange by OS changeThemeByOS: false, // Autochange by hour options (24hrs format, string must be in: hh:mm) From 0e2fe47225a3a7f1d7c723c6876d765a7db3f2db Mon Sep 17 00:00:00 2001 From: lew Date: Mon, 14 Mar 2022 20:22:17 +0000 Subject: [PATCH 3/3] Change image location to point to dockerhub Missed this before pushing! --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index fd33db907..6112105dc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.9" services: bento: - image: bento + image: lewisdoesstuff/bento volumes: # Append Bento config location to below line. - /config.js:/usr/share/nginx/html/config.js