blob: 6e9d102fedbeeefbee7f560abac31bdba6ed03b3 [file] [log] [blame]
halil.cakal3a9613f2024-06-17 09:24:59 +01001# ============LICENSE_START===============================================
2# Copyright (C) 2024 Nordix Foundation. All rights reserved.
3# ========================================================================
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15# ============LICENSE_END=================================================
16
17events { }
18
19http {
20
21 # Add more server entries here for scaling or load balancing
22 upstream cps-and-ncmp {
danielhanrahan868e1db2024-09-18 14:35:39 +010023 least_conn;
halil.cakal69bd6542024-10-07 16:48:05 +010024 server cps-and-ncmp:8080;
halil.cakal3a9613f2024-06-17 09:24:59 +010025 }
26
27 server {
28 listen 80;
29
30 # Root location proxying
31 location / {
32 proxy_pass http://cps-and-ncmp;
33 include /etc/nginx/proxy_params; # Include common proxy parameters
34 }
35
36 location /swagger-ui/ { # Swagger UI location
37 proxy_pass http://cps-and-ncmp/swagger-ui/;
38 }
39
40 location /v3/api-docs/ { # API docs location
41 proxy_pass http://cps-and-ncmp/v3/api-docs/;
42 }
43
44 location /actuator/health { # Actuator health endpoint
45 proxy_pass http://cps-and-ncmp/actuator/health;
46 }
47
48 location /actuator/health/readiness { # Actuator readiness endpoint
49 proxy_pass http://cps-and-ncmp/actuator/health/readiness;
50 }
51
52 }
53}