hosts on comfyui

This commit is contained in:
2026-04-10 11:05:20 -07:00
commit 753017cac5
2 changed files with 62 additions and 0 deletions

31
docker-compose.yml Normal file
View File

@@ -0,0 +1,31 @@
version: "3.8"
services:
tailscale:
image: tailscale/tailscale:latest
hostname: comfyui
environment:
- TS_AUTHKEY=tskey-auth-kNm64Dbcts11CNTRL-4eLQjm2pQYCLdy285gNaYCFDF1KTjP71
- TS_STATE_DIR=/var/lib/tailscale
- TS_USERSPACE=false
volumes:
- ./tailscale-state:/var/lib/tailscale
devices:
- /dev/net/tun:/dev/net/tun
cap_add:
- net_admin
- net_raw
restart: unless-stopped
nginx:
image: nginx:latest
depends_on:
- tailscale
restart: unless-stopped
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
network_mode: service:tailscale
volumes:
tailscale-state:
driver: local

31
nginx.conf Normal file
View File

@@ -0,0 +1,31 @@
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
server {
listen 80;
server_name _;
client_max_body_size 100M;
location / {
proxy_pass http://workstation:8188;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
}
}
}