-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0052028
commit a1feb77
Showing
3 changed files
with
105 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,62 @@ | ||
upstream auth { | ||
server auth:5001; | ||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
upstream customer { | ||
server customer:5002; | ||
} | ||
|
||
upstream shopkeeper { | ||
server shopkeeper:5003; | ||
} | ||
|
||
|
||
upstream agent { | ||
server agent:5000; | ||
} | ||
|
||
|
||
server { | ||
listen 80; | ||
server_name api-gateway; | ||
location /auth { | ||
proxy_pass http://auth; | ||
} | ||
location /customer { | ||
proxy_pass http://customer; | ||
} | ||
location /shopkeeper { | ||
proxy_pass http://shopkeeper; | ||
} | ||
location /agent { | ||
proxy_pass http://agent; | ||
} | ||
|
||
} | ||
|
||
|
||
server { | ||
listen 443; | ||
server_name api-gateway; | ||
location /auth { | ||
proxy_pass http://auth; | ||
} | ||
location /customer { | ||
proxy_pass http://customer; | ||
} | ||
location /shopkeeper { | ||
proxy_pass http://shopkeeper; | ||
} | ||
location /agent { | ||
proxy_pass http://agent; | ||
} | ||
|
||
# Ensure everything is inside the `http` block | ||
http { | ||
upstream auth { | ||
server auth:5001; | ||
} | ||
|
||
# upstream customer { | ||
# server customer:5002; | ||
# } | ||
|
||
# upstream shopkeeper { | ||
# server shopkeeper:5003; | ||
# } | ||
|
||
# upstream agent { | ||
# server agent:5000; | ||
# } | ||
|
||
server { | ||
listen 80; | ||
server_name api-gateway; | ||
|
||
location /auth { | ||
proxy_pass http://auth; | ||
} | ||
# location /customer { | ||
# proxy_pass http://customer; | ||
# } | ||
# location /shopkeeper { | ||
# proxy_pass http://shopkeeper; | ||
# } | ||
# location /agent { | ||
# proxy_pass http://agent; | ||
# } | ||
} | ||
|
||
# server { | ||
# listen 443 ssl; | ||
# server_name api-gateway; | ||
|
||
# # Add your SSL certificates here | ||
# ssl_certificate /etc/nginx/ssl/nginx.crt; | ||
# ssl_certificate_key /etc/nginx/ssl/nginx.key; | ||
|
||
# location /auth { | ||
# proxy_pass http://auth; | ||
# } | ||
# location /customer { | ||
# proxy_pass http://customer; | ||
# } | ||
# location /shopkeeper { | ||
# proxy_pass http://shopkeeper; | ||
# } | ||
# location /agent { | ||
# proxy_pass http://agent; | ||
# } | ||
# } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters