webwebbuild commited on
Commit
fdcbc34
·
verified ·
1 Parent(s): 8ca21d7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -0
Dockerfile CHANGED
@@ -1 +1,19 @@
1
  FROM ghcr.io/mhsanaei/3x-ui:latest
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  FROM ghcr.io/mhsanaei/3x-ui:latest
2
+
3
+ # Install Nginx to bridge the ports
4
+ RUN apt-get update && apt-get install -y nginx
5
+
6
+ # Configure Nginx to forward port 7860 traffic to the VPN panel port 2053
7
+ RUN echo 'server { \n\
8
+ listen 7860;\n\
9
+ location / { \n\
10
+ proxy_pass http://127.0.0.1:2053; \n\
11
+ proxy_set_header Host $host; \n\
12
+ proxy_set_header X-Real-IP $remote_addr; \n\
13
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; \n\
14
+ } \n\
15
+ }' > /etc/nginx/sites-available/default
16
+
17
+ # Start both the VPN panel and Nginx together
18
+ CMD /usr/local/x-ui/x-ui & nginx -g "daemon off;"
19
+