From 7133781c03774f6cb08828ec0434584075e2c497 Mon Sep 17 00:00:00 2001 From: qvalentin Date: Tue, 20 Oct 2020 10:08:55 +0200 Subject: [PATCH 1/7] adde cleanUp scripts --- cleanUp.sh | 9 +++++++++ config.cfg | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 cleanUp.sh diff --git a/cleanUp.sh b/cleanUp.sh new file mode 100755 index 0000000..3549d91 --- /dev/null +++ b/cleanUp.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +restname="FileFighterREST" +frontendname="FileFighterFrontend" +dbname="FileFighterDB" + + +docker container stop $restname && docker container rm $restname +docker container stop $frontendname && docker container rm $frontendname +docker container stop $dbname && docker container rm $dbname \ No newline at end of file diff --git a/config.cfg b/config.cfg index 1b9468a..ccf9565 100644 --- a/config.cfg +++ b/config.cfg @@ -4,4 +4,4 @@ db_user=root db_port=27017 db_name=filefighter use_stable_versions=true -db_password= +db_password=LILTCCkXIrRqbscMSVBgcfZuczqroajDwhIfSepTYoKtLOYnsL From 797af43d04ea861b3326ef902dd2be39dc43d61a Mon Sep 17 00:00:00 2001 From: open-schnick Date: Tue, 20 Oct 2020 11:26:50 +0200 Subject: [PATCH 2/7] implemented changes (#2) --- config.cfg | 2 +- cleanUp.sh => stop_services.sh | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename cleanUp.sh => stop_services.sh (100%) mode change 100755 => 100644 diff --git a/config.cfg b/config.cfg index ccf9565..1b9468a 100644 --- a/config.cfg +++ b/config.cfg @@ -4,4 +4,4 @@ db_user=root db_port=27017 db_name=filefighter use_stable_versions=true -db_password=LILTCCkXIrRqbscMSVBgcfZuczqroajDwhIfSepTYoKtLOYnsL +db_password= diff --git a/cleanUp.sh b/stop_services.sh old mode 100755 new mode 100644 similarity index 100% rename from cleanUp.sh rename to stop_services.sh From f52a256eca4eb529c8cf725cbd8384b2d10d80ba Mon Sep 17 00:00:00 2001 From: open-schnick Date: Tue, 20 Oct 2020 14:12:18 +0200 Subject: [PATCH 3/7] FF-58 wrote README.md, changed line breaks. --- README.md | 77 +++++++++++++++++++++- init_setup.sh | 2 +- stop_services.sh => lib/remove_services.sh | 0 3 files changed, 77 insertions(+), 2 deletions(-) rename stop_services.sh => lib/remove_services.sh (100%) diff --git a/README.md b/README.md index 13e481d..edf458d 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,83 @@ Setup Scripts for clients to download. ![Release](https://img.shields.io/github/v/release/filefighter/clientsetup?color=dark-green&label=Latest%20Version&logo=github&style=for-the-badge) -## Requirenments +## Requirements + +### Operating Systems +Currently, we support only Unix-like operating systems like [Ubuntu](https://ubuntu.com). MacOs is still on our roadmap. +For windows systems you could use [wsl](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux) to set that up read more [here](https://docs.microsoft.com/en-us/windows/wsl/install-win10). + +### Dependencies +One of the of goals of FileFighter is, that the client, that's you, only needs to met only one single dependency. +You need **Docker**. +Docker is a way to organise and run multiple applications. You can imagine it like a virtual machine (technical it`s a bit different), with a small file- and operating system within your machine. +Sounds more scary than it actually is. Different Applications run in different containers, these only contain the necessary software to run the application. +The containers use the resources of the host machine, depending on the load. +Advantages are security and the possibility to easily shutdown and update the services. See more under [Usage](#Usage). + +#### Docker +First check whether you have docker already installed. +To do that run: +```shell script +docker -v +``` +If you see something like that (your version might be different): +```shell script +Docker version 19.03.13, build 4484c46d9f +``` +You are good to go, and you can skip to [Usage](#Usage). + +To install **Docker** on Unix you can either use [snap](https://www.howtogeek.com/660193/how-to-work-with-snap-packages-on-linux/) or [apt](https://en.wikipedia.org/wiki/APT_(software)) as a package manager. +With snap its easier but of course it's not always possible to use snap. + +##### Install with Snap +To install Docker with [snap](https://www.howtogeek.com/660193/how-to-work-with-snap-packages-on-linux/) you can run: +```shell script +sudo snap install docker +``` +##### Install with Apt +Installing with [apt](https://en.wikipedia.org/wiki/APT_(software)) is a bit more difficult you can read [here](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04) more about it. ## Usage +After successfully installing docker you can start using FileFighter. +This Repository contains one important script: +* The [initial start](./init_setup.sh) script starts downloads all the application and starts them in different containers. Run it with +```shell script +./init_setup +``` +After starting the script you should see something like the following: +```shell script +-------------------------< FileFighter >-------------------------- +| Version 1.0 Last updated at 14.10.20 | +| Developed by Gimleux, Valentin, Open-Schnick. | +| Development Blog: https://filefighter.github.io | +| The code can be found at: https://www.github.com/filefighter | +--------------------< Started Initial Setup >--------------------- +``` +After the script succeeds you should be able to see the FileFighter Application. + +### Configuration +The script uses a [config.cfg](./config.cfg) file that stores information in `key=value` format. +Valid keys to configure how FileFighter behaves are listed here: + +| Key | Possible Values | Default | Description | +| :----: | :----: | :----: | :----: | +| rest_port | 0-65535 | 8080 | The port of the restapi service that will be published for the frontend. | +| frontend_port | 0-65535 | 80 | The port of the webapp (frontend) service. You can visit the FileFighter application over this port. | +| db_user | any string | root | The name of the Database running in the background. | +| db_password | any string | none (see below) | The password of the database. (The database won't be exposed to the internet, but passwords never hurt.) | +| db_port | 0-65535 | 27017 | The port of the database. | +| db_name | any string | filefighter | The name of the database. | +| use_stable_versions | true / false | true | When set to true the latest stable versions will be used. When set to false always the latest (possible unstable) versions will be used. | + +All of these keys use the [default values](./lib/config.cfg.defaults) if you don't overwrite those values. +It is also possible to have an empty [config.cfg](./config.cfg) file as the default values will be used. +If the `db_password` key is empty, a random password will be generated. + +Be carefully as the developers of FileFighter won't take responsibility when you are using the application or configuration options wrong or in a not intended way. + +## Remaining Files +All the remaining not explicitly explained files are important for the scripts to work. ## Help +For further help, feedback or questions write us an [email](mailto:filefighter@t-online.de). diff --git a/init_setup.sh b/init_setup.sh index 4a7eea6..0e4757b 100755 --- a/init_setup.sh +++ b/init_setup.sh @@ -147,5 +147,5 @@ docker start $frontendname >/dev/null 2>&1 echo "" echo "Finished Building FileFighter." -echo "Hosting Frontend at: http://localhost:$frontend_port/" +echo "Hosting Frontend at: http://localhost:$frontend_port" echo "" diff --git a/stop_services.sh b/lib/remove_services.sh similarity index 100% rename from stop_services.sh rename to lib/remove_services.sh From 989798779489197c040789eaeeb4689dc522ca7f Mon Sep 17 00:00:00 2001 From: open-schnick Date: Tue, 20 Oct 2020 14:32:56 +0200 Subject: [PATCH 4/7] fixed spelling --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index edf458d..9107db7 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The containers use the resources of the host machine, depending on the load. Advantages are security and the possibility to easily shutdown and update the services. See more under [Usage](#Usage). #### Docker -First check whether you have docker already installed. +First check whether you have Docker already installed. To do that run: ```shell script docker -v @@ -37,10 +37,10 @@ To install Docker with [snap](https://www.howtogeek.com/660193/how-to-work-with- sudo snap install docker ``` ##### Install with Apt -Installing with [apt](https://en.wikipedia.org/wiki/APT_(software)) is a bit more difficult you can read [here](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04) more about it. +Installing with [apt](https://en.wikipedia.org/wiki/APT_(software)) is a bit more difficult you can read [here](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-Docker-on-ubuntu-20-04) more about it. ## Usage -After successfully installing docker you can start using FileFighter. +After successfully installing Docker you can start using FileFighter. This Repository contains one important script: * The [initial start](./init_setup.sh) script starts downloads all the application and starts them in different containers. Run it with ```shell script From 5cb8bde043dd63eca5b76a408c3479fef081bd57 Mon Sep 17 00:00:00 2001 From: Open Schnick <60597856+open-schnick@users.noreply.github.com> Date: Wed, 21 Oct 2020 09:17:36 +0200 Subject: [PATCH 5/7] implemented change requests from (#3) --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9107db7..2334c65 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Installing with [apt](https://en.wikipedia.org/wiki/APT_(software)) is a bit mor ## Usage After successfully installing Docker you can start using FileFighter. This Repository contains one important script: -* The [initial start](./init_setup.sh) script starts downloads all the application and starts them in different containers. Run it with +The [initial start](./init_setup.sh) script starts downloading all the application and starts them in different containers. Run it with ```shell script ./init_setup ``` @@ -55,7 +55,10 @@ After starting the script you should see something like the following: | The code can be found at: https://www.github.com/filefighter | --------------------< Started Initial Setup >--------------------- ``` -After the script succeeds you should be able to see the FileFighter Application. +After the script succeeds you should be able to see the FileFighter Application in your browser. +Depending on your configuration file (see below), you should see the application after running the script [here](http://localhost:80/). + +To be sure everything is setup correctly click [here](http://localhost:80/health). If everything is green you are good to go. ### Configuration The script uses a [config.cfg](./config.cfg) file that stores information in `key=value` format. From 9d2a3f5a710807b474dfcc14737b2492f584d9e6 Mon Sep 17 00:00:00 2001 From: Open Schnick <60597856+open-schnick@users.noreply.github.com> Date: Wed, 21 Oct 2020 13:25:33 +0200 Subject: [PATCH 6/7] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2334c65..09cafda 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,8 @@ Installing with [apt](https://en.wikipedia.org/wiki/APT_(software)) is a bit mor ## Usage After successfully installing Docker you can start using FileFighter. -This Repository contains one important script: +Just download this repository as a zipfile [here](https://github.com/FileFighter/ClientSetup/releases/). +This repository contains one important script: The [initial start](./init_setup.sh) script starts downloading all the application and starts them in different containers. Run it with ```shell script ./init_setup @@ -57,7 +58,8 @@ After starting the script you should see something like the following: ``` After the script succeeds you should be able to see the FileFighter Application in your browser. Depending on your configuration file (see below), you should see the application after running the script [here](http://localhost:80/). - +You should see a login page. For the first setup you can use the credentials +`username=admin password=admin` To be sure everything is setup correctly click [here](http://localhost:80/health). If everything is green you are good to go. ### Configuration From d1cb8900db40eb3b48b1b0b33ad6c6a5f96204b8 Mon Sep 17 00:00:00 2001 From: Open Schnick <60597856+open-schnick@users.noreply.github.com> Date: Thu, 22 Oct 2020 13:46:57 +0200 Subject: [PATCH 7/7] fixed spelling (#3) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 09cafda..1b1e4c4 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Installing with [apt](https://en.wikipedia.org/wiki/APT_(software)) is a bit mor After successfully installing Docker you can start using FileFighter. Just download this repository as a zipfile [here](https://github.com/FileFighter/ClientSetup/releases/). This repository contains one important script: -The [initial start](./init_setup.sh) script starts downloading all the application and starts them in different containers. Run it with +The [initial start](./init_setup.sh) script starts downloading all the services and starts them in different containers. Run it with ```shell script ./init_setup ``` @@ -56,7 +56,7 @@ After starting the script you should see something like the following: | The code can be found at: https://www.github.com/filefighter | --------------------< Started Initial Setup >--------------------- ``` -After the script succeeds you should be able to see the FileFighter Application in your browser. +After the script succeeds you should be able to see the FileFighter application in your browser. Depending on your configuration file (see below), you should see the application after running the script [here](http://localhost:80/). You should see a login page. For the first setup you can use the credentials `username=admin password=admin`