screenshot-to-code
screenshot-to-code copied to clipboard
Add detailed self-hosting instructions
Can anyone share me the steps to host this on my own domain? I am not very much familiar with docker and its deployments.
You can use Docker to deploy this. But you can also just deploy it without Docker. The front-end is a simple react app, and the backend is a simple FastAPI Python server. I deployed it on Render for https://screenshottocode.com
If someone wants to write up more detailed instructions, please do, and I'll add it to the README.
The server keeps crashing on Render
Would Google the error
Its not like that. It boots up and then stops the script I'll share my configurations
I'm just saying it's impossible to debug something if you don't share logs.
==> Deploying... ==> Using Node version 20.10.0 (default) ==> Docs on specifying a Node version: https://render.com/docs/node-version ==> Running 'poetry run uvicorn main:app --reload --port 7001' INFO: Will watch for changes in these directories: ['/opt/render/project/src'] INFO: Uvicorn running on http://127.0.0.1:7001/ (Press CTRL+C to quit) INFO: Started reloader process [41] using StatReload ERROR: Error loading ASGI app. Could not import module "main". Deploy cancelled ==> Deploying... ==> Using Node version 20.10.0 (default) ==> Docs on specifying a Node version: https://render.com/docs/node-version ==> Running 'poetry run uvicorn main:app --reload --port 7001' INFO: Will watch for changes in these directories: ['/opt/render/project/src/backend'] INFO: Uvicorn running on http://127.0.0.1:7001/ (Press CTRL+C to quit) INFO: Started reloader process [43] using StatReload INFO: Started server process [47] INFO: Waiting for application startup. INFO: Application startup complete.
ERROR: Error loading ASGI app. Could not import module "main".
This is my backend deployment on Render
env var
Why are you trying to deploy it on Render instead of just running it locally? The docker set up should be easy
This is my backend deployment on Render
env var
![]()
All other fields are default?
Yes, I think so. Make sure root dir is backend and then you'd deploy frontend separately.
Sure. I am trying it
Build succeeded.
==> Build uploaded in 9s ==> Build successful 🎉 ==> Using Node version 20.10.0 (default) ==> Docs on specifying a Node version: https://render.com/docs/node-version ==> Running 'poetry run uvicorn main:app --reload --port 7001' INFO: Will watch for changes in these directories: ['/opt/render/project/src'] INFO: Uvicorn running on http://127.0.0.1:7001/ (Press CTRL+C to quit) INFO: Started reloader process [41] using StatReload ERROR: Error loading ASGI app. Could not import module "main".
I am having this module missing error.
Everything worked fine. @abi Only the timeout occurs after 15mins and deployment is automatically cancelled. Last log is application startup complete
I have used a web service instance on render
Is there any other setting to stop this timeout
This issue is resolved
Going to leave it open so someone can add in a doc with more detailed instructions.
Glad it's solved for you!
Hi all!
I am using this tool internally at my company (thanks @abi and all the contributors). We are self-hosting and have access locked down to specific folks. Here is a comprehensive guide on how do it securely using Cloudflare on a generic VPS:
https://jonathanadly.com/guide-to-securing-your-self-hosted-open-source-ai-app
(happy to open a PR and put the recipe section somewhere in the docs. Just let me know - because this guide is probably a bit advanced)
env var