-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ 支持Huggingface Space部署方式使用Cloudflare Tunnels自定义访问域名 (#707)
* feat: ✨ 支持Huggingface Space部署方式使用Cloudflare Tunnels自定义访问域名 * 在中英文之间添加空格 * 添加空格 * 删除无关文件 * Update Dockerfile * 将cloudflared日志输出到标准输出 * 优化Dockerfile * 将日志输出到标准输出
- Loading branch information
1 parent
b1f3c86
commit 20203bb
Showing
7 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM node:lts-slim AS build | ||
|
||
RUN useradd -m app | ||
|
||
USER root | ||
|
||
RUN npm i -g tkserver | ||
|
||
ADD https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 /usr/local/bin/cloudflared | ||
RUN chmod +x /usr/local/bin/cloudflared | ||
|
||
COPY ./src/start.sh /usr/bin/start.sh | ||
|
||
USER app | ||
WORKDIR /home/app/twikoo | ||
|
||
CMD ["sh", "/usr/bin/start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: Twikoo Huggingface Space | ||
emoji: 📚 | ||
colorFrom: yellow | ||
colorTo: indigo | ||
sdk: docker | ||
pinned: false | ||
app_port: 8080 | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
nohup /usr/local/bin/cloudflared tunnel --no-autoupdate run --token $CF_ZERO_TRUST_TOKEN >> /dev/stdout 2>&1 & | ||
tkserver |