From c648a03a8bdef39cadd2b204ea29a69a8c89faaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=9F=D1=80=D0=B8=D0=BC=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Sun, 31 Oct 2021 15:47:20 +0300 Subject: [PATCH] light weight + admin2 --- 80.conf | 96 ++++++++++++++-------------------------- docker up.sh | 2 + nginx.conf | 54 +++++++++++----------- parts/api-miltystub.conf | 15 +++++++ 4 files changed, 77 insertions(+), 90 deletions(-) create mode 100644 docker up.sh create mode 100644 parts/api-miltystub.conf diff --git a/80.conf b/80.conf index 4f38554..a1a8bd9 100644 --- a/80.conf +++ b/80.conf @@ -3,21 +3,21 @@ server { server_name inno-ijl.ru; # index index.php index.html index.htm index.nginx-debian.html; - location /api/ { - # add_header 'Access-Control-Allow-Origin' '*'; - # add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - # add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; - # add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; - proxy_pass http://backend/; - } + # location /api/ { + # # add_header 'Access-Control-Allow-Origin' '*'; + # # add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + # # add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; + # # add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; + # proxy_pass http://backend/; + # } - location /multystub/ { - # add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; - add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; - proxy_pass http://multystub/; - } + # location /multystub/ { + # # add_header 'Access-Control-Allow-Origin' '*'; + # add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + # add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; + # add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; + # proxy_pass http://multystub/; + # } location / { add_header 'Access-Control-Allow-Origin' '*'; @@ -32,13 +32,7 @@ server { listen 80; server_name b1.inno-ijl.ru; - location /api/ { - proxy_pass http://backend/; - } - - location /multystub/ { - proxy_pass http://multystub/; - } + include "parts/api-multystub.conf"; location / { add_header 'Access-Control-Allow-Origin' '*'; @@ -72,54 +66,30 @@ server { proxy_pass http://admin/; } } + server { listen 80; - index index.php index.html index.htm index.nginx-debian.html; - server_name khv-sanek.inno-ijl.ru; - root /home/ijl/ijl/apps/xxl; + server_name admin2.inno-ijl.ru; location / { - try_files $uri $uri/ =404; - index index.html; - } - - location ~ \.php$ { - include fastcgi-php.conf; - fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; + proxy_pass http://89.223.94.192:3072; } } -server { - listen 80; - index index.php index.html index.htm index.nginx-debian.html; - server_name victorina.inno-ijl.ru; - root /home/ijl/ijl/apps/petrus/dist; +# server { +# listen 80; +# index index.php index.html index.htm index.nginx-debian.html; +# server_name victorina.inno-ijl.ru; +# root /home/ijl/ijl/apps/petrus/dist; - location / { - try_files $uri $uri/ /index.html; - } -} +# location / { +# try_files $uri $uri/ /index.html; +# } +# } -server { - listen 80; - index index.php index.html index.htm index.nginx-debian.html; - server_name alexei.inno-ijl.ru; - root /home/ijl/ijl/apps/alexei; - - location / { - try_files $uri $uri/ =404; - index index.html; - } - - location ~ \.php$ { - include fastcgi-php.conf; - fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; - } -} - -server { - listen 80; - index index.html; - server_name alinakhaff.inno-ijl.ru; - root /home/ijl/ijl/apps/alinakhaff; -} \ No newline at end of file +# server { +# listen 80; +# index index.html; +# server_name alinakhaff.inno-ijl.ru; +# root /home/ijl/ijl/apps/alinakhaff; +# } \ No newline at end of file diff --git a/docker up.sh b/docker up.sh new file mode 100644 index 0000000..6dbbd8c --- /dev/null +++ b/docker up.sh @@ -0,0 +1,2 @@ +docker container run --name jenkins-docker --detach --privileged --network jenkins --network-alias docker --env DOCKER_TLS_CERTDIR=/certs --volume jenkins-docker-certs:/certs/client --volume jenkins-data:/var/jenkins_home --publish 2376:2376 docker:dind; +docker container run --name jenkins-blueocean --detach --network jenkins --env DOCKER_HOST=tcp://docker:2376 --env DOCKER_CERT_PATH=/certs/client --env DOCKER_TLS_VERIFY=1 --publish 8080:8080 --publish 50000:50000 --volume jenkins-data:/var/jenkins_home --volume jenkins-docker-certs:/certs/client:ro jenkinsci/blueocean; \ No newline at end of file diff --git a/nginx.conf b/nginx.conf index d8584cc..60d9039 100644 --- a/nginx.conf +++ b/nginx.conf @@ -27,38 +27,38 @@ http { server 89.223.94.192:8090; } - server { - listen 8080; - # server_name inno-ijl.ru; - # index index.php index.html index.htm index.nginx-debian.html; + # server { + # listen 8080; + # # server_name inno-ijl.ru; + # # index index.php index.html index.htm index.nginx-debian.html; - location / { - add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; - add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; - proxy_pass http://89.223.94.192:8079/; - } + # location / { + # add_header 'Access-Control-Allow-Origin' '*'; + # add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + # add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; + # add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; + # proxy_pass http://89.223.94.192:8079/; + # } - location /api { - add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; - add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; - proxy_pass http://backend; - } + # location /api { + # add_header 'Access-Control-Allow-Origin' '*'; + # add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + # add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; + # add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; + # proxy_pass http://backend; + # } - location /multystub/ { - #add_header 'Access-Control-Allow-Origin' '*'; - #add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; - add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; - proxy_pass http://multystub/; - } - } + # location /multystub/ { + # #add_header 'Access-Control-Allow-Origin' '*'; + # #add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + # add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; + # add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; + # proxy_pass http://multystub/; + # } + # } # include ./83-php.conf; - include 3002-apps-static.conf; + # include 3002-apps-static.conf; include 80.conf; } diff --git a/parts/api-miltystub.conf b/parts/api-miltystub.conf new file mode 100644 index 0000000..6075be3 --- /dev/null +++ b/parts/api-miltystub.conf @@ -0,0 +1,15 @@ +location /api/ { + # add_header 'Access-Control-Allow-Origin' '*'; + # add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + # add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; + # add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; + proxy_pass http://backend/; +} + +location /multystub/ { + # add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; + add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; + proxy_pass http://multystub/; +} \ No newline at end of file