This is the document for self-hosting In fact, from the document,
I don't quite understand the meaning of each field in pcconfig.py.
Is there any demonstration of self-hosting?
Or is there a more complete official document?
This is mine.
pcconfig.py
config = pc.Config(
app_name="myapp",
api_url="http://myhost:8100",
bun_path="$HOME/.bun/bin/bun",
db_url="sqlite:///pynecone.db",
)
I use nginx on my website. It gets the error message.
WebSocket connection to 'wss://myhost:8100/event/?EIO=4&transport=websocket' failed
I don't know what's going on, but it just won't work,
and I can't quite make out what the file says.
Is anything wrong on my pcconfig.py?
Do you have any suggestion?
Thanks.
Here, I can share my experience of the self-hosting by nginx briefly. And if you want to have detailed information, you can read this article.
Scenario
My Resources
My Goal
For a pinecone project, it will finally build to frontend part and backend part. And I hope to achieve the following goal.
To achieve this goal with the current resource, we have the following 3 steps to complete this mission.
1. DNS Setting
my host's IP is 111.123.xxx.33
And I can add the two A record on DNS.
The two domain is with the same IP
2. Pynecone Project
pcconfig.py
This file give the following information.
pc commands to start project
3. Nginx Setting
/etc/nginx/nginx.conf
Insert the following to include the setting.
/somepath/my-nginx-sites-enabled/xxxxx-backend.mydomain.net
The above set the following 4 things.
(this is pynecone's backend according to your pcconfig.py)
/somepath/my-nginx-sites-enabled/xxxxx-frontend.mydomain.net
The above set the following 4 things.