Persnolised_farm / DOCKER_RUN.md
pranit144's picture
Upload 16 files
12e0bb3 verified

Overview

This repo now contains a run.py that mounts app2.py routes under the /bot prefix and a Dockerfile to run the single combined server.

Build image (PowerShell):

# From the project folder (where Dockerfile is located)
docker build -t farm-portal:latest .

Run container (PowerShell):

# Map container port 5000 to host 5000 and set environment vars if needed
docker run -p 5000:5000 --env GOOGLE_API_KEY="your_key_here" --env GEMINI_API_KEY="your_key_here" --env BOT_TOKEN="your_telegram_bot_token" -d --name farm-portal farm-portal:latest

How to access

Notes and caveats

  • app2 templates may contain absolute links like /download or /scheduled. When served under /bot, those links must be updated to include the /bot prefix or use url_for in templates. If you see broken links, update app2.py templates or the generated HTML to point to /bot/....
  • The code contains placeholder API keys and tokens. Replace them with environment variables before deploying.
  • For local testing you can skip setting AI/TG env vars but some AI/Telegram features will be disabled or warn at startup.