☁️cloudflare tunnel

1. コンテナを作る

2. tokenを控えておく

docker run cloudflare/cloudflared:latest tunnel --no-autoupdate run --token [token]

3. URLを コンテナ名:開放しているポート で設定

4. 以下のように記述する

docker-compose.yaml

    cloudflared:
        restart: unless-stopped
        image: cloudflare/cloudflared:latest
        container_name: cloudflared
        command: tunnel --no-autoupdate run --token ${CLOUDFLARE_TUNNEL_TOKEN}

.env

CLOUDFLARE_TUNNEL_TOKEN=

Last updated