add for docker-compose and nginx #86

Closed
opened 2025-12-04 13:59:33 +08:00 by angyuang · 2 comments
angyuang commented 2025-12-04 13:59:33 +08:00 (Migrated from github.com)

#add docker-compose
#cat docker-compose.yaml
version: "3.9"

services:
hubproxy:
image: ghcr.io/sky22333/hubproxy:latest
container_name: hubproxy
ports:
- "5000:5000"
volumes:
- ./config.toml:/root/config.toml
restart: always

#add config for nginx

server {
listen 80;
server_name example.com; # 按需修改

location / {
    proxy_pass              http://127.0.0.1:5000;
    proxy_set_header        Host                $host;
    proxy_set_header        X-Real-IP           $remote_addr;
    proxy_set_header        X-Forwarded-For     $remote_addr;
    proxy_set_header        X-Forwarded-Proto   $scheme;

    # 可选:WebSocket 支持
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

}

#add docker-compose #cat docker-compose.yaml version: "3.9" services: hubproxy: image: ghcr.io/sky22333/hubproxy:latest container_name: hubproxy ports: - "5000:5000" volumes: - ./config.toml:/root/config.toml restart: always #add config for nginx server { listen 80; server_name example.com; # 按需修改 location / { proxy_pass http://127.0.0.1:5000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; # 可选:WebSocket 支持 proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
sky22333 commented 2025-12-04 19:55:33 +08:00 (Migrated from github.com)

这是什么?nginx反代配置示例吗?

这是什么?nginx反代配置示例吗?
hausen1012 commented 2026-01-06 16:27:47 +08:00 (Migrated from github.com)

这个没必要,自己配就行了

这个没必要,自己配就行了
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: 3344/hubproxy#86