Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

Commit a8a554d

Browse files
committed
added resolver and variable to ci nginx config to prevent frontend from failing
1 parent c8d048c commit a8a554d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Diff for: nginx/ci/ci.conf

+6-4
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ http {
99
include /etc/nginx/mime.types;
1010
client_max_body_size 100m;
1111

12-
upstream backend {
13-
server backend:8000;
14-
}
12+
# upstream backend {
13+
# server backend:8000;
14+
# }
1515

1616
# upstream asgiserver {
1717
# server asgiserver:9000;
@@ -45,8 +45,10 @@ http {
4545

4646
# backend urls
4747
location ~ ^/(admin|api|media|static) {
48+
resolver 127.0.0.1 valid=30s;
4849
proxy_redirect off;
49-
proxy_pass http://backend;
50+
set $backend backend;
51+
proxy_pass http://$backend:8000;
5052
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
5153
proxy_set_header Host $http_host;
5254
}

Diff for: quasar/quasar.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ module.exports = function(ctx) {
6262
}
6363
: {
6464
API_HOST: "backend",
65-
API_URL: '"http://frontend"', // nginx proxy passes to backend
65+
API_URL: '"http://0.0.0.0"', // nginx proxy passes to backend
6666
WS_PROTOCOL: "ws://"
6767
},
6868
scopeHoisting: true,

0 commit comments

Comments
 (0)