Skip to content

Commit 159915a

Browse files
feat: add api as upstream
1 parent a4a9e30 commit 159915a

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

env/nginx/nginx.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ http {
1414
listen 8080;
1515
server_name localhost;
1616

17+
include upstreams.conf;
1718
include site.conf;
1819
}
1920
}

env/nginx/site.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ location / {
77
}
88

99
location /api/ {
10-
proxy_pass http://prose-pod-api:8080/;
10+
proxy_pass http://api;
1111

1212
proxy_http_version 1.1;
1313

env/nginx/upstreams.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
upstream api {
2+
least_conn;
3+
keepalive 1;
4+
5+
server prose-pod-api:8080 max_fails=10 fail_timeout=1s;
6+
}

0 commit comments

Comments
 (0)