feat: add frp docker compose setup

This commit is contained in:
sherry committed 2026-08-05 03:19:11 -05:00
commit df67dd5e35
7 files changed
+90

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
# Copy this file to .env and adjust the values:
# cp .env.sample .env
FRPS_SERVER_ADDR=your-server-ip-or-domain
FRPS_SERVER_PORT=7000
# Must match the token on frps. Use a long random string, e.g. `openssl rand -hex 16`
FRPS_TOKEN=change-me-to-a-strong-random-token
TZ=Asia/Shanghai
+12
View File
@@ -0,0 +1,12 @@
services:
frpc:
image: snowdreamtech/frpc:latest
container_name: frpc
restart: unless-stopped
network_mode: host
env_file:
- .env
environment:
TZ: ${TZ:-Asia/Shanghai}
volumes:
- ./frpc.toml:/etc/frp/frpc.toml:ro
+29
View File
@@ -0,0 +1,29 @@
# {{ .Envs.XXX }} values are rendered from environment variables at startup
serverAddr = "{{ .Envs.FRPS_SERVER_ADDR }}"
serverPort = {{ .Envs.FRPS_SERVER_PORT }}
# Token must match the one configured on frps
auth.method = "token"
auth.token = "{{ .Envs.FRPS_TOKEN }}"
# Admin UI (optional) - http://127.0.0.1:7400
webServer.addr = "127.0.0.1"
webServer.port = 7400
# Proxies: the tunnels to create. Edit / add entries for your own services.
# Example: expose local SSH (port 22) as <frps-server>:6000
[[proxies]]
name = "ssh"
type = "tcp"
localIP = "127.0.0.1"
localPort = 22
remotePort = 6000
# Example: expose a local web service (port 8080) as <frps-server>:8080
[[proxies]]
name = "web"
type = "tcp"
localIP = "127.0.0.1"
localPort = 8080
remotePort = 8080