Skip to content

Latest commit

 

History

History
113 lines (84 loc) · 4.24 KB

RENDER_FIX.md

File metadata and controls

113 lines (84 loc) · 4.24 KB

🚨 RENDER DEPLOYMENT FIX - READ THIS FIRST 🚨

Problem: "No Open Ports Detected" Error

If you're seeing this error when deploying to Render:

==> No open ports detected, continuing to scan...
==> Docs on specifying a port: https://render.com/docs/web-services#port-binding

And you see output from start.sh with "MYCELIUM - Unified Startup" in the logs, YOUR SERVICE IS MISCONFIGURED.

Root Cause

Render is treating your service as a Python application instead of a Docker service. This happens when:

  1. The service was created manually in the Render dashboard as "Python" environment
  2. Or the render.yaml blueprint wasn't used
  3. Or the service was migrated/recreated incorrectly

Quick Fix (Choose ONE method)

Method 1: Use Blueprint (RECOMMENDED - Easiest)

  1. Delete the current misconfigured service in Render Dashboard
  2. Go to Render Dashboard → "New" → "Blueprint"
  3. Connect your GitHub repository
  4. Select the repository containing this code
  5. Render will automatically detect render.yaml and create the service correctly
  6. Click "Apply" to deploy

✅ This automatically configures the service as Docker with all correct settings

Method 2: Manual Docker Service Creation

If you prefer manual setup:

  1. Delete the current service
  2. Create "New" → "Web Service"
  3. Connect repository and branch
  4. ⚠️ CRITICAL: In "Environment" dropdown → Select "Docker" (NOT "Python"!)
  5. Set Dockerfile Path: ./Dockerfile.dev
  6. Set Docker Context: . (dot, meaning root directory)
  7. Set Docker Command: supervisord -c /etc/supervisor/supervisord.conf
  8. Add Persistent Disk:
    • Name: user-data
    • Mount Path: /freqtrade/user_data
    • Size: 1 GB
  9. Set environment variables (see RENDER_DEPLOYMENT.md)
  10. Click "Create Web Service"

How to Verify the Fix

After recreating the service, check the deployment logs:

✅ Correct Logs (Docker mode):

#1 [internal] load build definition from Dockerfile.dev
#2 [internal] load metadata for docker.io/library/python:3.12-slim
...
🚀 Freqtrade Docker Development Environment
=============================================
📁 Setting up user_data directory structure...
✅ Initialization complete!
🚀 Starting services with supervisord...

❌ Incorrect Logs (Python mode):

==> Checking Python installation...
✓ Python 3.13.4 detected
✓ Running in virtual environment: /opt/render/project/src/.venv
==========================================================
  MYCELIUM - Unified Startup
==========================================================
==> No open ports detected, continuing to scan...

Why This Happens

  • Render has two different deployment modes: Native buildpacks (Python, Node, etc.) and Docker
  • When you have requirements.txt, package.json, or other language files, Render auto-detects the language
  • If the service is created as "Python" environment, it ignores Dockerfile and tries to run Python directly
  • The render.yaml only works when you create the service via "Blueprint" or manually select "Docker"

Important Notes

  1. start.sh is for local development only - it should NEVER run on Render
  2. The .renderignore file excludes start.sh, but that only works in Docker mode
  3. In Python mode, Render ignores .renderignore and uses .gitignore instead
  4. You MUST delete and recreate the service - you cannot change from Python to Docker in settings

Full Documentation

For complete deployment instructions, see:

Still Having Issues?

If you've followed these steps and still have problems:

  1. Check that Dockerfile.dev exists in the repository root
  2. Verify the render.yaml file exists and has no syntax errors
  3. Make sure you selected the correct branch in Render
  4. Check Render logs for any Docker build errors
  5. Ensure your GitHub repository is properly connected to Render

TL;DR: Delete the service, create new one as "Docker" (not "Python"), or use Blueprint. The service MUST run in Docker mode.