|
|
|
@ -36,6 +36,10 @@ spec: |
|
|
|
- containerPort: 8200 |
|
|
|
name: semcust-http |
|
|
|
protocol: TCP |
|
|
|
volumeMounts: |
|
|
|
- mountPath: /etc/nginx/conf.d |
|
|
|
readOnly: true |
|
|
|
name: nginx-conf |
|
|
|
imagePullPolicy: Always |
|
|
|
- name: backend |
|
|
|
image: packages.semapp.lan:5000/semcust_backend:develop |
|
|
|
@ -55,6 +59,11 @@ spec: |
|
|
|
envFrom: |
|
|
|
- configMapRef: |
|
|
|
name: semcust-dev-config-dev |
|
|
|
volumes: |
|
|
|
- name: nginx-conf |
|
|
|
configMap: |
|
|
|
name: nginx-conf |
|
|
|
|
|
|
|
--- |
|
|
|
apiVersion: v1 |
|
|
|
kind: ConfigMap |
|
|
|
@ -72,14 +81,129 @@ data: |
|
|
|
DJANGO_DB_PORT: "5432" |
|
|
|
ALLOWED_HOSTS: '["*"]' |
|
|
|
FRONTEND_URL: "semcust-dev.k3s.semapp.lan" |
|
|
|
API_URL: "http://semcust-dev.k3s.semapp.lan/" |
|
|
|
|
|
|
|
--- |
|
|
|
apiVersion: v1 |
|
|
|
kind: ConfigMap |
|
|
|
metadata: |
|
|
|
namespace: dev-environment |
|
|
|
name: nginx-conf |
|
|
|
data: |
|
|
|
default.conf: | |
|
|
|
upstream backend { |
|
|
|
server semcust-backend-dev:5200; |
|
|
|
} |
|
|
|
|
|
|
|
server { |
|
|
|
listen 8200; |
|
|
|
|
|
|
|
#server_name semcust-dev.semapp.lan; |
|
|
|
|
|
|
|
access_log /var/log/nginx/access.log; |
|
|
|
charset utf-8; |
|
|
|
client_max_body_size 1G; |
|
|
|
|
|
|
|
location / { |
|
|
|
root /srv/semcust; |
|
|
|
#add_header X-Frame-Options "SAMEORIGIN"; |
|
|
|
index index.html index.htm; |
|
|
|
try_files $uri $uri /index.html =404; |
|
|
|
} |
|
|
|
|
|
|
|
location ~ ^/api { |
|
|
|
proxy_pass http://backend; |
|
|
|
proxy_redirect off; |
|
|
|
|
|
|
|
proxy_set_header Host $host; |
|
|
|
proxy_set_header X-Real-IP $remote_addr; |
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
|
|
|
|
proxy_read_timeout 300s; |
|
|
|
proxy_send_timeout 300s; |
|
|
|
send_timeout 300s; |
|
|
|
} |
|
|
|
|
|
|
|
location /admin { |
|
|
|
proxy_pass http://backend; |
|
|
|
proxy_redirect off; |
|
|
|
|
|
|
|
proxy_set_header Host $host; |
|
|
|
proxy_set_header X-Real-IP $remote_addr; |
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
|
|
|
|
proxy_read_timeout 300s; |
|
|
|
proxy_send_timeout 300s; |
|
|
|
send_timeout 300s; |
|
|
|
} |
|
|
|
|
|
|
|
location /forum { |
|
|
|
proxy_pass http://backend; |
|
|
|
proxy_redirect off; |
|
|
|
|
|
|
|
proxy_set_header Host $host; |
|
|
|
proxy_set_header X-Real-IP $remote_addr; |
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
|
|
|
|
proxy_read_timeout 300s; |
|
|
|
proxy_send_timeout 300s; |
|
|
|
send_timeout 300s; |
|
|
|
} |
|
|
|
|
|
|
|
location /confluence { |
|
|
|
proxy_pass http://backend; |
|
|
|
proxy_redirect off; |
|
|
|
|
|
|
|
proxy_set_header Host $host; |
|
|
|
proxy_set_header X-Real-IP $remote_addr; |
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
|
|
|
|
proxy_read_timeout 300s; |
|
|
|
proxy_send_timeout 300s; |
|
|
|
send_timeout 300s; |
|
|
|
} |
|
|
|
|
|
|
|
location /help-desk { |
|
|
|
proxy_pass http://backend; |
|
|
|
proxy_redirect off; |
|
|
|
|
|
|
|
proxy_set_header Host $host; |
|
|
|
proxy_set_header X-Real-IP $remote_addr; |
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
|
|
|
|
proxy_read_timeout 300s; |
|
|
|
proxy_send_timeout 300s; |
|
|
|
send_timeout 300s; |
|
|
|
} |
|
|
|
|
|
|
|
location /static-backend { |
|
|
|
proxy_pass http://backend; |
|
|
|
proxy_redirect off; |
|
|
|
|
|
|
|
proxy_set_header Host $host; |
|
|
|
proxy_set_header X-Real-IP $remote_addr; |
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
|
|
|
|
proxy_read_timeout 300s; |
|
|
|
proxy_send_timeout 300s; |
|
|
|
send_timeout 300s; |
|
|
|
} |
|
|
|
|
|
|
|
error_page 404 =200 /index.html; |
|
|
|
|
|
|
|
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; |
|
|
|
|
|
|
|
expires off; |
|
|
|
open_file_cache off; |
|
|
|
sendfile off; |
|
|
|
} |
|
|
|
|
|
|
|
--- |
|
|
|
# semcust Service |
|
|
|
apiVersion: v1 |
|
|
|
kind: Service |
|
|
|
metadata: |
|
|
|
name: semcust-dev |
|
|
|
name: semcust-frontend-dev |
|
|
|
namespace: dev-environment |
|
|
|
spec: |
|
|
|
selector: |
|
|
|
@ -95,7 +219,7 @@ spec: |
|
|
|
apiVersion: v1 |
|
|
|
kind: Service |
|
|
|
metadata: |
|
|
|
name: backend |
|
|
|
name: semcust-backend-dev |
|
|
|
namespace: dev-environment |
|
|
|
spec: |
|
|
|
selector: |
|
|
|
@ -122,5 +246,5 @@ spec: |
|
|
|
paths: |
|
|
|
- path: / |
|
|
|
backend: |
|
|
|
serviceName: semcust-dev |
|
|
|
serviceName: semcust-frontend-dev |
|
|
|
servicePort: 8200 |