blob: 17fad1b87686c4df8b46819a0d8ceebf34ef4aac [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 {
23 server cps-and-ncmp:8080;
24 }
25
26 server {
27 listen 80;
28
29 # Root location proxying
30 location / {
31 proxy_pass http://cps-and-ncmp;
32 include /etc/nginx/proxy_params; # Include common proxy parameters
33 }
34
35 location /swagger-ui/ { # Swagger UI location
36 proxy_pass http://cps-and-ncmp/swagger-ui/;
37 }
38
39 location /v3/api-docs/ { # API docs location
40 proxy_pass http://cps-and-ncmp/v3/api-docs/;
41 }
42
43 location /actuator/health { # Actuator health endpoint
44 proxy_pass http://cps-and-ncmp/actuator/health;
45 }
46
47 location /actuator/health/readiness { # Actuator readiness endpoint
48 proxy_pass http://cps-and-ncmp/actuator/health/readiness;
49 }
50
51 }
52}