docker-compose
docker-compose安装
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose.yml
version: "3.7"
networks:
ssr:
external: true
services:
caddy:
image: caddy:alpine
#restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./caddy/site:/srv
- ./caddy/data:/data
- ./caddy/config:/config
environment:
- ACME_AGREE=true
- TZ=Asia/Shanghai
networks:
- ssr
v2ray:
image: v2ray/official:latest
ports:
- "1090:1090"
volumes:
- ./v2ray:/etc/v2ray
networks:
- ssr
networks:
ssr:
driver: bridge
创建网络这一步已经取消了
~~docker network create ssr
ss配置文件config.json
{
"inbounds": [
{
"port": 10900,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "b831381d-6324-4d53-ad4f-8cda48b30811",
"alterId": 64
}
]
},
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "/love"
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
}
]
}
Caddyfile
domain.name {
tls tls@mmgg.net
reverse_proxy /love v2ray:10900 {
header_up Connection {http.request.header.Connection}
header_up Upgrade {http.request.header.Upgrade}
}
}