Skip to content

Commit 29812aa

Browse files
add nginx reverse proxy
1 parent 4aa124e commit 29812aa

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,12 @@ services:
3232
- "8443:8443"
3333
depends_on:
3434
- db
35+
36+
nginx:
37+
image: nginx:latest
38+
ports:
39+
- "80:80"
40+
volumes:
41+
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
42+
depends_on:
43+
- app

nginx/nginx.conf

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Basic Nginx configuration structure
2+
3+
# Global configurations might be here
4+
# ...
5+
6+
events {
7+
# Essential event-based directives go here
8+
# For example:
9+
# worker_connections
10+
# ...
11+
}
12+
13+
http {
14+
# HTTP-related configurations go here
15+
16+
map $http_upgrade $connection_upgrade {
17+
default upgrade;
18+
'' close;
19+
}
20+
21+
server {
22+
listen 80;
23+
24+
proxy_http_version 1.1;
25+
proxy_set_header Host $host;
26+
proxy_set_header Upgrade $http_upgrade;
27+
proxy_set_header Connection $connection_upgrade;
28+
location / {
29+
30+
proxy_pass http://app:8180/steve/websocket/CentralSystemService/;
31+
32+
}
33+
}
34+
35+
# Other server blocks or configurations can follow here
36+
# ...
37+
38+
}

0 commit comments

Comments
 (0)