Serving TexLive Files in an On-Demand Manner.
This is an adaptation of the SwiftLaTeX Texlive 2 server made deployable with Cloudflare Tunnel.
-
Create a Cloudflare account and add your domain.
-
Get the Global API token from Cloudflare.
-
Copy the envfile to
.envand fill in the required values including theCLOUDFLARE_API_KEYandHOST_DOMAIN(the link to your cloudflared domain or sub-domain). -
Run the following command to build the docker file:
docker compose -f docker-compose.cloudflare.yml build
-
Run the following command to start the cloudflare deployment:
docker compose -f docker-compose.cloudflare.yml up -d chmod +x ./scripts/run_texlive_cloudflare_tunnel.sh source ./.env && ./scripts/run_texlive_cloudflare_tunnel.sh "${CLOUDFLARE_API_KEY}" "${HOST_DOMAIN}" "${PORT}"
NOTE You can stop the deployment with
docker compose -f docker-compose.cloudflare.yml downcommand. -
On the first usage, you will be directed to the Cloudflare login page. After logging in, you will have to authorize the domain you specified in the
.envfileHOST_DOMAIN. -
After the authorization, you will be redirected to the Texlive app. You can now use the app with your custom domain.