nginx.conf edit
Some checks failed
test/timeline-frontend/pipeline/head There was a failure building this commit
Some checks failed
test/timeline-frontend/pipeline/head There was a failure building this commit
This commit is contained in:
1
Jenkinsfile
vendored
1
Jenkinsfile
vendored
@@ -220,6 +220,7 @@ def deployToEnvironment(String env) {
|
|||||||
--name ${containerName} \
|
--name ${containerName} \
|
||||||
--restart unless-stopped \
|
--restart unless-stopped \
|
||||||
-p ${getPortForEnvironment(env)}:80 \
|
-p ${getPortForEnvironment(env)}:80 \
|
||||||
|
--network host.docker.internal:host-gateway \
|
||||||
${imageToDeploy}
|
${imageToDeploy}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
40
nginx.conf
40
nginx.conf
@@ -5,10 +5,48 @@ events {
|
|||||||
http {
|
http {
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
upstream /user-api/{
|
||||||
|
server host.docker.internal:33333;
|
||||||
|
}
|
||||||
|
upstream /file/{
|
||||||
|
server host.docker.internal:33333;
|
||||||
|
}
|
||||||
|
upstream /story/{
|
||||||
|
server host.docker.internal:33333;
|
||||||
|
}
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
location /user-api/ {
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
|
proxy_set_header X-Forwarded-Port $server_port;
|
||||||
|
proxy_set_header Authorization $authorization;
|
||||||
|
proxy_pass http://user-api/;
|
||||||
|
}
|
||||||
|
location /file/ {
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
|
proxy_set_header X-Forwarded-Port $server_port;
|
||||||
|
proxy_set_header Authorization $authorization;
|
||||||
|
proxy_pass http://file/;
|
||||||
|
}
|
||||||
|
location /story/ {
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
|
proxy_set_header X-Forwarded-Port $server_port;
|
||||||
|
proxy_set_header Authorization $authorization;
|
||||||
|
proxy_pass http://story/;
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
|
|||||||
Reference in New Issue
Block a user