Add credentials.json and update cloudflared configuration in Dockerfile

This commit is contained in:
2025-08-15 14:19:58 +05:30
parent 232c6ec530
commit 458b2ca06f
3 changed files with 5 additions and 3 deletions

View File

@@ -34,6 +34,7 @@ RUN mkdir -p /etc/cloudflared
# Copy the certificate file and config # Copy the certificate file and config
COPY cert.pem /etc/cloudflared/cert.pem COPY cert.pem /etc/cloudflared/cert.pem
COPY credentials.json /etc/cloudflared/credentials.json
COPY config.json /etc/cloudflared/config.json COPY config.json /etc/cloudflared/config.json
# Copy the binary from builder # Copy the binary from builder
@@ -55,7 +56,7 @@ RUN echo "[supervisord]" > /etc/supervisor/conf.d/supervisord.conf && \
echo "stderr_logfile_maxbytes=0" >> /etc/supervisor/conf.d/supervisord.conf && \ echo "stderr_logfile_maxbytes=0" >> /etc/supervisor/conf.d/supervisord.conf && \
echo "" >> /etc/supervisor/conf.d/supervisord.conf && \ echo "" >> /etc/supervisor/conf.d/supervisord.conf && \
echo "[program:cloudflared]" >> /etc/supervisor/conf.d/supervisord.conf && \ echo "[program:cloudflared]" >> /etc/supervisor/conf.d/supervisord.conf && \
echo "command=cloudflared tunnel --url http://localhost:8080 run" >> /etc/supervisor/conf.d/supervisord.conf && \ echo "command=cloudflared tunnel --config /etc/cloudflared/config.json run" >> /etc/supervisor/conf.d/supervisord.conf && \
echo "autostart=true" >> /etc/supervisor/conf.d/supervisord.conf && \ echo "autostart=true" >> /etc/supervisor/conf.d/supervisord.conf && \
echo "autorestart=true" >> /etc/supervisor/conf.d/supervisord.conf && \ echo "autorestart=true" >> /etc/supervisor/conf.d/supervisord.conf && \
echo "stdout_logfile=/dev/stdout" >> /etc/supervisor/conf.d/supervisord.conf && \ echo "stdout_logfile=/dev/stdout" >> /etc/supervisor/conf.d/supervisord.conf && \

View File

@@ -1,6 +1,6 @@
{ {
"tunnel": "YOUR_TUNNEL_ID_HERE", "tunnel": "5d2682ef-0b5b-47e5-b0fa-ad48968ce016",
"credentials-file": "/etc/cloudflared/cert.pem", "credentials-file": "/etc/cloudflared/credentials.json",
"ingress": [ "ingress": [
{ {
"hostname": "api.ishikabhoyar.tech", "hostname": "api.ishikabhoyar.tech",

View File

@@ -0,0 +1 @@
{"AccountTag":"453afb9373a00a55876e6127cf0efd97","TunnelSecret":"02VClcBt+1nxxu8ioUzw/UizXtKKh4X7UUpneVbfB/Y=","TunnelID":"5d2682ef-0b5b-47e5-b0fa-ad48968ce016"}