From f3a256f8d62e366245ee1c6112ee61b748e13bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Mon, 2 May 2022 13:57:24 +0200 Subject: [PATCH] Default app fix --- Makefile | 2 +- examples/default/nginx.conf | 10 ++++++++++ rosti.tmpl.sh | 5 ++++- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 examples/default/nginx.conf diff --git a/Makefile b/Makefile index 055a9c3..be4127d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ REPO=harbor.hq.rosti.cz/rosti/runtime DOCKER=docker -VERSION=2022.04-1 +VERSION=2022.05-1 all: build diff --git a/examples/default/nginx.conf b/examples/default/nginx.conf new file mode 100644 index 0000000..be5792a --- /dev/null +++ b/examples/default/nginx.conf @@ -0,0 +1,10 @@ +server { + listen 8000; + + root /srv/app/; + index index.html; + + location / { + try_files $uri $uri/ =404; + } +} diff --git a/rosti.tmpl.sh b/rosti.tmpl.sh index 34ec51c..4216270 100755 --- a/rosti.tmpl.sh +++ b/rosti.tmpl.sh @@ -41,7 +41,7 @@ function setTech() { echo "NOTE: /srv/app doesn't exists, creating it from $tech example application" mkdir -p /srv/app cp -a /opt/examples/$name/* /srv/app/ - mv /srv/app/supervisor.conf /srv/conf/supervisor.d/$name.conf + test $name -eq "default" || mv /srv/app/supervisor.conf /srv/conf/supervisor.d/$name.conf else echo "IMPORTANT: /srv/app found so no configuration or files are copied, make sure the application is ok after this process" fi @@ -198,6 +198,9 @@ function quickTech() { "redis") setService $TECH ;; + "default") + setTech $TECH + ;; esac }