Fix API vhost in nginx container
This commit is contained in:
parent
f463abb3e2
commit
122f535e34
1 changed files with 7 additions and 2 deletions
|
@ -3,10 +3,15 @@ server {
|
||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl http2;
|
||||||
server_name _API_DOMAIN_;
|
server_name _API_DOMAIN_;
|
||||||
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
# Using a variable here stops nginx from crashing if the dev container is restarted or becomes otherwise unavailable
|
# Using a variable here stops nginx from crashing if the dev container is restarted or becomes otherwise unavailable
|
||||||
set $backend_upstream devenv;
|
set $backend_upstream "http://devenv:_API_PORT_";
|
||||||
proxy_pass http://$backend_upstream:_API_PORT_;
|
# Using a variable in proxy_pass also requires resolver to be set.
|
||||||
|
# This is the address of the internal docker compose DNS server.
|
||||||
|
resolver 127.0.0.11;
|
||||||
|
|
||||||
|
proxy_pass $backend_upstream;
|
||||||
|
|
||||||
client_max_body_size 200M;
|
client_max_body_size 200M;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue