SPACECOM / Dockerfile
webwebbuild's picture
Update Dockerfile
539a75f verified
Raw History Blame Contribute Delete
682 Bytes
FROM ghcr.io/mhsanaei/3x-ui:latest
# Install Nginx using the Alpine Linux package manager
RUN apk update && apk add nginx
# Configure Nginx to forward port 7860 traffic to the VPN panel port 2053 correctly across all internal interfaces
RUN mkdir -p /run/nginx && \
echo 'server { \n\
listen 7860;\n\
location / { \n\
proxy_pass http://0.0.0; \n\
proxy_set_header Host $host; \n\
proxy_set_header X-Real-IP $remote_addr; \n\
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; \n\
} \n\
}' > /etc/nginx/http.d/default.conf
# Start both the VPN panel and Nginx together
CMD /usr/local/x-ui/x-ui & nginx -g "daemon off;"