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