From d3a9f3853990341abadbd6d0de8a841832180aa7 Mon Sep 17 00:00:00 2001 From: Anselm Stordeur Date: Tue, 22 Jan 2019 13:39:04 +0100 Subject: [PATCH 01/14] feat: add minimal deployment --- .gitignore | 1 + README.md | 122 +++++++++++++++++++++++++++++++++++++++++++++ docker-compose.yml | 30 +++++++++++ start.sh | 89 +++++++++++++++++++++++++++++++++ 4 files changed, 242 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 docker-compose.yml create mode 100755 start.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..74d3e87d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +database/ diff --git a/README.md b/README.md new file mode 100644 index 00000000..e366c040 --- /dev/null +++ b/README.md @@ -0,0 +1,122 @@ +# Minimal deployment +This is an example for how a deployment for StApps can look like. The project also shows why we decided to use Docker +for the deployment on all universities. With help of Docker's virtualization you don't have to install and configure +anything beyond `docker` and `docker compose` itself. + +A complete StApps deployment consists of following projects: +``` +|*****| |*******| |*********| |**********| +| app | <----> | proxy | <----> | backend | <----> | database | +|*****| |*******| |*********| |**********| + ^ + | + |************| + | connectors | + |************| +``` + +This project shows a very fast way to deploy [backend](https://gitlab.com/openstapps/backend), +[database](https://gitlab.com/openstapps/database) and [api](https://gitlab.com/openstapps/api) (to copy some data from +an existing deployment of the TU Berlin). + + +With a running backend and database you should be able to run the [app](https://gitlab.tubit.tu-berlin.de/stapps/app) +with your deployment. + +# Step by step to your own deployment +At first you need to install [docker](https://docs.docker.com/install/) and +[docker-compose](https://docs.docker.com/compose/install/). Then clone or download this repository. To download the +docker images from GitLab you have to be authenticated against GitLabs container registry. Please execute +`docker login gitlab-registry.tubit.tu-berlin.de`. The requested credentials are the same as for GitLab. +`docker login` stores the credentials the users home directory. If you plan to execute docker commands only from root +or via sudo you should run `docker login` with root or sudo as well. + + +On Linux machines you should be able to proceed on [Execution on Linux](#execution-on-linux) otherwise follow me step +by step. + + +Be sure to execute all the following commands in the repository and with root privileges or access to the Docker daemon. + +## Start the database +Our current database is Elasticsearch and most configuration is contained in the Docker image. Since Docker is not a +full virtualization it uses the hosts kernel. That's why on some systems you may need to increase your virtual memory to +get Elasticsearch to work. +([documentation for increasing your virtual memory](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/vm-max-map-count.html)) + + +To start the database +```sh +# create a directory for all data +mkdir -p database + +# let the database be the owner of the folder +chown 1000:1000 database + +# start the database +docker-compose up -d database + +# have a look at the logs of the database +docker-compose logs database +``` + +As stated in the `docker-compose.yml` the database will expose port `9200` to other services in the same deployment +(all services in the file). + +## Start the backend +The backend is providing an interface to search and bulk index data into the database. Simply run: + +```sh +# start the backend +docker-compose up -d backend + +# have a look at the logs of the backend +docker-compose logs backend +``` + + +The backend will find the database on `http://database:9200` inside the deployment network. As stated in the +`docker-compose.yml` the backend will expose port 3000 on the host. You should be able to request the backend for it's +configuration on http://localhost:3000. + + +Now you have a running backend that can be queried by the app. You could already try to the install the +[app](https://gitlab.com/openstapps/app) and use it with your local deployment. That is pretty boring, because the +backend doesn't provide any data by now. + +There is no public deployment for the app version 2.0.0 by now. But you could copy some data from there. + +To import some `SCPlace`'s you could run: +```sh +docker-compose run --rm api copy --appVersion 2.0.0 place http://backend:3000 20 +``` +This will copy data using the [api](https://gitlab.com/openstapps/api) from the deployment of the TU Berlin to your +deployment. + +# Execution on Linux +On Linux you can execute a simple shell script that will run you through +steps above and copy some data in your deployment: + +```sh +sh start.sh +``` + +# Where to go from here +## Writing your own connector +You now have your own deployment and can import some data from your university into the backend. To write your own +program to import data you should checkout the [minimal-connector](https://gitlab.com/openstapps/minimal-connector/) +This is a small program that shows the usage of the [api](https://gitlab.com/openstapps/api/) and imports some example +data from TypeScript code. Feel free to copy the [minimal-connector](https://gitlab.com/openstapps/minimal-connector/) +and write your own connector with it. + +## Round off your deployment with the [proxy](https://gitlab.com/openstapps/proxy) +The backend is exposed on the port 3000 now. This means anyone can import data into your backend and you can only run +one version of the backend at a time. Have a look at the [proxy](https://gitlab.com/openstapps/proxy/) to secure and +round off your deployment. The proxy will allow you to run multiple deployments for different app version on one server +and provide some static data like images for your university. + +## Explore docker capabilities +Docker is a great tool with many great features. Have a look at the +[docker cli documentation](https://docs.docker.com/engine/reference/commandline/cli/) or our +[docker cheat sheet](https://gitlab.tubit.tu-berlin.de/stapps/projectmanagement/blob/master/DOCKER.md) to learn +more about it. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..403cb989 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,30 @@ +version: '2' +services: + database: + image: registry.gitlab.com/openstapps/database:master + volumes: + - ./database:/usr/share/elasticsearch/data + expose: + - "9200" + + backend: + image: registry.gitlab.com/openstapps/backend/default:master + environment: + ES_PORT_9200_TCP_ADDR: database + ES_PORT_9200_TCP_PORT: 9200 + NODE_CONFIG_ENV: "elasticsearch" + ALLOW_NO_TRANSPORT: "true" + expose: + - 3000 + ports: + - 3000:3000 + links: + - "database" + labels: + - stapps.version=1.0.0 + + api: + image: registry.gitlab.com/openstapps/api/copy:v0.0.3 + links: + - "backend" + diff --git a/start.sh b/start.sh new file mode 100755 index 00000000..3e432a82 --- /dev/null +++ b/start.sh @@ -0,0 +1,89 @@ +SUDO='' + +if [ $(id -u) != 0 ]; then + SUDO='sudo' +fi + +if ! hash docker 2>/dev/null; then + echo "\"docker\" executable not found. Please install docker." + exit 1 +fi + +if ! hash docker-compose 2>/dev/null; then + echo "\"docker-compose\" executable not found. Please install docker-compose." + exit 1 +fi + +# check kernel parameter +# check if vm.max_map_count is at least 262144 on host +# this is needed for elasticsearch >5.x +ACTUAL_MAX_MAP_COUNT=$(sysctl -n vm.max_map_count) +MINIMAL_MAX_MAP_COUNT=262144 + +if [ "$ACTUAL_MAX_MAP_COUNT" -lt "$MINIMAL_MAX_MAP_COUNT" ]; then + echo "vm.max_map_count is too low. This is a kernel parameter used by java which is used by elasticsearch. Elasticsearch won't run if vm.max_map_count is too low." + while true; do + read -p "Do you wish to increase vm.max_map_count to 262144? " yn + case $yn in + [Yy]* ) $SUDO sysctl -w "vm.max_map_count=262144"; echo "To make this change permanent after restart: Add \"vm.max_map_count=262144\" to \"/etc/sysctl.conf\""; break;; + [Nn]* ) exit 1;; + * ) echo "Please answer yes or no.";; + esac + done +fi + +mkdir -p database +$SUDO chown 1000:1000 database + +cat < Date: Tue, 12 Mar 2019 16:21:00 +0000 Subject: [PATCH 02/14] feature: add rudimentary "wait for elasticsearch" --- docker-compose.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 403cb989..de8617ae 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '2' +version: '2.1' services: database: image: registry.gitlab.com/openstapps/database:master @@ -6,6 +6,12 @@ services: - ./database:/usr/share/elasticsearch/data expose: - "9200" + restart: unless-stopped + healthcheck: + test: ["CMD", "nc", "-zv", "localhost", "9200"] + interval: 5s + timeout: 10s + retries: 20 backend: image: registry.gitlab.com/openstapps/backend/default:master @@ -22,6 +28,10 @@ services: - "database" labels: - stapps.version=1.0.0 + restart: unless-stopped + depends_on: + database: + condition: service_healthy api: image: registry.gitlab.com/openstapps/api/copy:v0.0.3 From 58802562f3c33d4294cbf1e6a80a58357b44fae5 Mon Sep 17 00:00:00 2001 From: Rainer Killinger Date: Thu, 14 Mar 2019 13:31:51 +0000 Subject: [PATCH 03/14] fix: change permissions of database folder --- README.md | 2 +- start.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e366c040..5ae8870b 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ To start the database mkdir -p database # let the database be the owner of the folder -chown 1000:1000 database +chown 100:101 database # start the database docker-compose up -d database diff --git a/start.sh b/start.sh index 3e432a82..769c7e3b 100755 --- a/start.sh +++ b/start.sh @@ -33,7 +33,7 @@ if [ "$ACTUAL_MAX_MAP_COUNT" -lt "$MINIMAL_MAX_MAP_COUNT" ]; then fi mkdir -p database -$SUDO chown 1000:1000 database +$SUDO chown 100:101 database cat < Date: Thu, 14 Mar 2019 13:39:09 +0000 Subject: [PATCH 04/14] refactor: simplify setup by already adding folder --- README.md | 9 +++------ database/.gitkeep | 0 start.sh | 1 - 3 files changed, 3 insertions(+), 7 deletions(-) create mode 100644 database/.gitkeep diff --git a/README.md b/README.md index 5ae8870b..8a12d0d8 100644 --- a/README.md +++ b/README.md @@ -47,13 +47,10 @@ get Elasticsearch to work. To start the database ```sh -# create a directory for all data -mkdir -p database - -# let the database be the owner of the folder +# let the elasticsearch user and group be the owner of the folder chown 100:101 database -# start the database +# start the database container docker-compose up -d database # have a look at the logs of the database @@ -67,7 +64,7 @@ As stated in the `docker-compose.yml` the database will expose port `9200` to ot The backend is providing an interface to search and bulk index data into the database. Simply run: ```sh -# start the backend +# start the backend container docker-compose up -d backend # have a look at the logs of the backend diff --git a/database/.gitkeep b/database/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/start.sh b/start.sh index 769c7e3b..98980d39 100755 --- a/start.sh +++ b/start.sh @@ -32,7 +32,6 @@ if [ "$ACTUAL_MAX_MAP_COUNT" -lt "$MINIMAL_MAX_MAP_COUNT" ]; then done fi -mkdir -p database $SUDO chown 100:101 database cat < Date: Thu, 6 Jun 2019 12:49:02 +0200 Subject: [PATCH 05/14] build: update .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 74d3e87d..485dee64 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -database/ +.idea From 60cabb6406c710ee770898e9a027f21c61f2dd97 Mon Sep 17 00:00:00 2001 From: Karl-Philipp Wulfert Date: Thu, 6 Jun 2019 12:49:33 +0200 Subject: [PATCH 06/14] docs: add issue templates --- .gitlab/issue_templates/bug.md | 38 ++++++++++++++++++++++++++++++ .gitlab/issue_templates/feature.md | 16 +++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 .gitlab/issue_templates/bug.md create mode 100644 .gitlab/issue_templates/feature.md diff --git a/.gitlab/issue_templates/bug.md b/.gitlab/issue_templates/bug.md new file mode 100644 index 00000000..f46f50ae --- /dev/null +++ b/.gitlab/issue_templates/bug.md @@ -0,0 +1,38 @@ +## Summary + +(Summarize the bug encountered concisely) + + +## Steps to reproduce + +(How one can reproduce the issue - this is very important) + + +## Example Project + +(If possible, please create an example project here on GitLab.com that exhibits the problematic behaviour, and link to it here in the bug report) + +(If you are using an older version of GitLab, this will also determine whether the bug has been fixed in a more recent version) + + +## What is the current bug behavior? + +(What actually happens) + + +## What is the expected correct behavior? + +(What you should see instead) + + +## Relevant logs and/or screenshots + +(Paste any relevant logs - please use code blocks (```) to format console output, +logs, and code as it's very hard to read otherwise.) + + +## Possible fixes + +(If you can, link to the line of code that might be responsible for the problem) + +/label ~meeting diff --git a/.gitlab/issue_templates/feature.md b/.gitlab/issue_templates/feature.md new file mode 100644 index 00000000..cb9b0517 --- /dev/null +++ b/.gitlab/issue_templates/feature.md @@ -0,0 +1,16 @@ +## Description + +(Describe the feature that you're requesting concisely) + + +## Explanation + +(Explain why the feature is necessary) + + +## Dependencies, issues to be resolved beforehand + +(List issues or dependencies that need to be resolved before this feature can be implemented) + + +/label ~meeting From 27a48dd1685483db9f0233fe1eeec5cf43975bfa Mon Sep 17 00:00:00 2001 From: Michel Jonathan Schmitz Date: Thu, 25 Jul 2019 09:53:25 +0200 Subject: [PATCH 07/14] refactor: ignore content of the database --- database/.gitignore | 1 + database/.gitkeep | 0 2 files changed, 1 insertion(+) create mode 100644 database/.gitignore delete mode 100644 database/.gitkeep diff --git a/database/.gitignore b/database/.gitignore new file mode 100644 index 00000000..f54b6b96 --- /dev/null +++ b/database/.gitignore @@ -0,0 +1 @@ +nodes/ diff --git a/database/.gitkeep b/database/.gitkeep deleted file mode 100644 index e69de29b..00000000 From 23f4f2de2fac23d62e28107244173452f0f6c543 Mon Sep 17 00:00:00 2001 From: Michel Jonathan Schmitz Date: Thu, 25 Jul 2019 09:54:09 +0200 Subject: [PATCH 08/14] refactor: remove health checks on startup --- docker-compose.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index de8617ae..d35ee5da 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3.7' services: database: image: registry.gitlab.com/openstapps/database:master @@ -7,11 +7,6 @@ services: expose: - "9200" restart: unless-stopped - healthcheck: - test: ["CMD", "nc", "-zv", "localhost", "9200"] - interval: 5s - timeout: 10s - retries: 20 backend: image: registry.gitlab.com/openstapps/backend/default:master @@ -30,8 +25,7 @@ services: - stapps.version=1.0.0 restart: unless-stopped depends_on: - database: - condition: service_healthy + - database api: image: registry.gitlab.com/openstapps/api/copy:v0.0.3 From 203a8127f578f332d7b4a17306b2d33f21b512f9 Mon Sep 17 00:00:00 2001 From: Michel Jonathan Schmitz Date: Thu, 25 Jul 2019 09:55:21 +0200 Subject: [PATCH 09/14] feat: add minimal-connector to compose --- README.md | 19 +++++++++++++++++++ docker-compose.yml | 4 ++++ start.sh | 5 +++++ systemd/minimal-connector.service | 10 ++++++++++ systemd/minimal-connector.timer | 8 ++++++++ 5 files changed, 46 insertions(+) create mode 100644 systemd/minimal-connector.service create mode 100644 systemd/minimal-connector.timer diff --git a/README.md b/README.md index 8a12d0d8..e0d0a54b 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,25 @@ This is a small program that shows the usage of the [api](https://gitlab.com/ope data from TypeScript code. Feel free to copy the [minimal-connector](https://gitlab.com/openstapps/minimal-connector/) and write your own connector with it. +## Add your connector +You may want to integrate your connectors in the `docker-compose.yml` to +deploy your whole StApps-backend-environment in a single command. Use the +`systemd` directory in this project as an example of how to deploy +your connector(s) and configure `systemd` services and timers. + +The service will try to restart a named container. That means for successful +execution the container needs to be started once before with the appropriate +command. +```shell +docker-compose up minimal-connector +``` + +To enable the service that runs the connector periodically execute: +```shell +systemctl --now enable /absolute/path/minimal-deployment/minimal-connector/minimal-connector.service /absolute/path/minimal-deployment/minimal-connector/minimal-connector.timer +``` +This command will immediately start the service on execution. + ## Round off your deployment with the [proxy](https://gitlab.com/openstapps/proxy) The backend is exposed on the port 3000 now. This means anyone can import data into your backend and you can only run one version of the backend at a time. Have a look at the [proxy](https://gitlab.com/openstapps/proxy/) to secure and diff --git a/docker-compose.yml b/docker-compose.yml index d35ee5da..3ee2b47c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,3 +32,7 @@ services: links: - "backend" + minimal-connector: + image: registry.gitlab.com/openstapps/minimal-connector:core-0.23 + container_name: minimal-connector-0.23 + command: ["http://backend:3000", "minimal-connector", "f-u"] diff --git a/start.sh b/start.sh index 98980d39..2873137c 100755 --- a/start.sh +++ b/start.sh @@ -52,6 +52,11 @@ Useful commands: * In case you don't need the containers to be running anymore, you can also stop them using docker-compose command (example for database container): $SUDO docker-compose stop database + +* If you want to test the functionality of the "minimal-connector", use the following command. + + $SUDO docker-compose up minimal-connector + EOF read _ diff --git a/systemd/minimal-connector.service b/systemd/minimal-connector.service new file mode 100644 index 00000000..bc92ea9e --- /dev/null +++ b/systemd/minimal-connector.service @@ -0,0 +1,10 @@ +[Unit] +Description=Restarts the "minimal-connector-0.23" container + +[Service] +Type=oneshot +User=root +ExecStart=/usr/bin/env docker restart minimal-connector-0.23 + +[Install] +WantedBy=multi-user.target diff --git a/systemd/minimal-connector.timer b/systemd/minimal-connector.timer new file mode 100644 index 00000000..ff2de4ee --- /dev/null +++ b/systemd/minimal-connector.timer @@ -0,0 +1,8 @@ +[Unit] +Description=Run the minimal-connector.service every 5 minutes. If you need other timer configurations, please refer to: https://wiki.archlinux.org/index.php/Systemd/Timers + +[Timer] +OnCalendar=*:0/5 + +[Install] +WantedBy=timers.target From d6a2f125f4deda92babcc5563e3a2fd5993ce3ae Mon Sep 17 00:00:00 2001 From: Michel Jonathan Schmitz Date: Thu, 25 Jul 2019 09:56:10 +0200 Subject: [PATCH 10/14] feat: add app to compose --- docker-compose.yml | 7 +++++++ start.sh | 3 +++ 2 files changed, 10 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 3ee2b47c..717a83ad 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,3 +36,10 @@ services: image: registry.gitlab.com/openstapps/minimal-connector:core-0.23 container_name: minimal-connector-0.23 command: ["http://backend:3000", "minimal-connector", "f-u"] + + app: + image: registry.gitlab.com/openstapps/app/executable:core-0.23 + expose: + - 8100 + ports: + - 8100:8100 diff --git a/start.sh b/start.sh index 2873137c..3c00bcff 100755 --- a/start.sh +++ b/start.sh @@ -57,6 +57,9 @@ Useful commands: $SUDO docker-compose up minimal-connector +* In case you want to see how the data looks like in the app, start its corresponding container. + + $SUDO docker-compose up app EOF read _ From 19e556c76ebd02779c799179bdc21b173b321c0d Mon Sep 17 00:00:00 2001 From: Michel Jonathan Schmitz Date: Thu, 25 Jul 2019 09:56:19 +0200 Subject: [PATCH 11/14] feat: fixate remaining image versions --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 717a83ad..e06f4692 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ services: restart: unless-stopped backend: - image: registry.gitlab.com/openstapps/backend/default:master + image: registry.gitlab.com/openstapps/backend/default:core-0.23 environment: ES_PORT_9200_TCP_ADDR: database ES_PORT_9200_TCP_PORT: 9200 @@ -28,7 +28,7 @@ services: - database api: - image: registry.gitlab.com/openstapps/api/copy:v0.0.3 + image: registry.gitlab.com/openstapps/api/copy:core-0.23 links: - "backend" From 74cd1a7ace51963978a24f0e41b571b1fccd808a Mon Sep 17 00:00:00 2001 From: Michel Jonathan Schmitz Date: Thu, 25 Jul 2019 09:58:43 +0200 Subject: [PATCH 12/14] docs: update README --- README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e0d0a54b..5df69962 100644 --- a/README.md +++ b/README.md @@ -20,14 +20,14 @@ This project shows a very fast way to deploy [backend](https://gitlab.com/openst an existing deployment of the TU Berlin). -With a running backend and database you should be able to run the [app](https://gitlab.tubit.tu-berlin.de/stapps/app) +With a running backend and database you should be able to run the [app](https://gitlab.com/openstapps/app) with your deployment. # Step by step to your own deployment At first you need to install [docker](https://docs.docker.com/install/) and [docker-compose](https://docs.docker.com/compose/install/). Then clone or download this repository. To download the docker images from GitLab you have to be authenticated against GitLabs container registry. Please execute -`docker login gitlab-registry.tubit.tu-berlin.de`. The requested credentials are the same as for GitLab. +`docker login registry.gitlab.com`. The requested credentials are the same as for GitLab. `docker login` stores the credentials the users home directory. If you plan to execute docker commands only from root or via sudo you should run `docker login` with root or sudo as well. @@ -74,7 +74,7 @@ docker-compose logs backend The backend will find the database on `http://database:9200` inside the deployment network. As stated in the `docker-compose.yml` the backend will expose port 3000 on the host. You should be able to request the backend for it's -configuration on http://localhost:3000. +configuration on http://localhost:3000 (or http://MY-IP-ADDRESS:3000). Now you have a running backend that can be queried by the app. You could already try to the install the @@ -84,7 +84,7 @@ backend doesn't provide any data by now. There is no public deployment for the app version 2.0.0 by now. But you could copy some data from there. To import some `SCPlace`'s you could run: -```sh +```shell docker-compose run --rm api copy --appVersion 2.0.0 place http://backend:3000 20 ``` This will copy data using the [api](https://gitlab.com/openstapps/api) from the deployment of the TU Berlin to your @@ -94,7 +94,7 @@ deployment. On Linux you can execute a simple shell script that will run you through steps above and copy some data in your deployment: -```sh +```shell sh start.sh ``` @@ -103,7 +103,7 @@ sh start.sh You now have your own deployment and can import some data from your university into the backend. To write your own program to import data you should checkout the [minimal-connector](https://gitlab.com/openstapps/minimal-connector/) This is a small program that shows the usage of the [api](https://gitlab.com/openstapps/api/) and imports some example -data from TypeScript code. Feel free to copy the [minimal-connector](https://gitlab.com/openstapps/minimal-connector/) +data from TypeScript code. Feel free to fork the [minimal-connector](https://gitlab.com/openstapps/minimal-connector/) and write your own connector with it. ## Add your connector @@ -128,11 +128,12 @@ This command will immediately start the service on execution. ## Round off your deployment with the [proxy](https://gitlab.com/openstapps/proxy) The backend is exposed on the port 3000 now. This means anyone can import data into your backend and you can only run one version of the backend at a time. Have a look at the [proxy](https://gitlab.com/openstapps/proxy/) to secure and -round off your deployment. The proxy will allow you to run multiple deployments for different app version on one server -and provide some static data like images for your university. +round off your deployment. The proxy will add a layer of security, allowing you to run multiple deployments for +different app version on one server and provide some static data like images for your university. + ## Explore docker capabilities Docker is a great tool with many great features. Have a look at the [docker cli documentation](https://docs.docker.com/engine/reference/commandline/cli/) or our -[docker cheat sheet](https://gitlab.tubit.tu-berlin.de/stapps/projectmanagement/blob/master/DOCKER.md) to learn +[docker cheat sheet](https://gitlab.com/openstapps/projectmanagement/blob/master/project-docs/DOCKER_CHEAT_SHEET.md) to learn more about it. From c09ecbb4b5936f454b9f067436d23367aa4f83a9 Mon Sep 17 00:00:00 2001 From: Michel Jonathan Schmitz Date: Wed, 6 May 2020 16:23:24 +0200 Subject: [PATCH 13/14] refactor: use new env-vars --- docker-compose.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e06f4692..6e1630b1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,10 +9,9 @@ services: restart: unless-stopped backend: - image: registry.gitlab.com/openstapps/backend/default:core-0.23 + image: registry.gitlab.com/openstapps/backend/default:core-0.31 environment: - ES_PORT_9200_TCP_ADDR: database - ES_PORT_9200_TCP_PORT: 9200 + ES_ADDR: "http://database:9200" NODE_CONFIG_ENV: "elasticsearch" ALLOW_NO_TRANSPORT: "true" expose: From bbed8bf1828a6869d9b34c0e64af3845a7e31b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Tue, 14 Mar 2023 17:36:01 +0100 Subject: [PATCH 14/14] refactor: move minimal-deployment to monorepo --- .gitignore => examples/minimal-deployment/.gitignore | 0 .../minimal-deployment/.gitlab}/issue_templates/bug.md | 0 .../minimal-deployment/.gitlab}/issue_templates/feature.md | 0 README.md => examples/minimal-deployment/README.md | 0 {database => examples/minimal-deployment/database}/.gitignore | 0 .../minimal-deployment/docker-compose.yml | 0 start.sh => examples/minimal-deployment/start.sh | 0 .../minimal-deployment/systemd}/minimal-connector.service | 0 .../minimal-deployment/systemd}/minimal-connector.timer | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename .gitignore => examples/minimal-deployment/.gitignore (100%) rename {.gitlab => examples/minimal-deployment/.gitlab}/issue_templates/bug.md (100%) rename {.gitlab => examples/minimal-deployment/.gitlab}/issue_templates/feature.md (100%) rename README.md => examples/minimal-deployment/README.md (100%) rename {database => examples/minimal-deployment/database}/.gitignore (100%) rename docker-compose.yml => examples/minimal-deployment/docker-compose.yml (100%) rename start.sh => examples/minimal-deployment/start.sh (100%) mode change 100755 => 100644 rename {systemd => examples/minimal-deployment/systemd}/minimal-connector.service (100%) rename {systemd => examples/minimal-deployment/systemd}/minimal-connector.timer (100%) diff --git a/.gitignore b/examples/minimal-deployment/.gitignore similarity index 100% rename from .gitignore rename to examples/minimal-deployment/.gitignore diff --git a/.gitlab/issue_templates/bug.md b/examples/minimal-deployment/.gitlab/issue_templates/bug.md similarity index 100% rename from .gitlab/issue_templates/bug.md rename to examples/minimal-deployment/.gitlab/issue_templates/bug.md diff --git a/.gitlab/issue_templates/feature.md b/examples/minimal-deployment/.gitlab/issue_templates/feature.md similarity index 100% rename from .gitlab/issue_templates/feature.md rename to examples/minimal-deployment/.gitlab/issue_templates/feature.md diff --git a/README.md b/examples/minimal-deployment/README.md similarity index 100% rename from README.md rename to examples/minimal-deployment/README.md diff --git a/database/.gitignore b/examples/minimal-deployment/database/.gitignore similarity index 100% rename from database/.gitignore rename to examples/minimal-deployment/database/.gitignore diff --git a/docker-compose.yml b/examples/minimal-deployment/docker-compose.yml similarity index 100% rename from docker-compose.yml rename to examples/minimal-deployment/docker-compose.yml diff --git a/start.sh b/examples/minimal-deployment/start.sh old mode 100755 new mode 100644 similarity index 100% rename from start.sh rename to examples/minimal-deployment/start.sh diff --git a/systemd/minimal-connector.service b/examples/minimal-deployment/systemd/minimal-connector.service similarity index 100% rename from systemd/minimal-connector.service rename to examples/minimal-deployment/systemd/minimal-connector.service diff --git a/systemd/minimal-connector.timer b/examples/minimal-deployment/systemd/minimal-connector.timer similarity index 100% rename from systemd/minimal-connector.timer rename to examples/minimal-deployment/systemd/minimal-connector.timer