More actions
THIS IS A WIP!
This (unofficial) guide was made by [@twonum https://hackclub.slack.com/team/U094NTBR1S5] (feel free to ask me for help).
I'm using Hypercorn as it's an ASGI server (for WebSockets support). To use a different server, replace the hypercorn commands with the ones that your server uses.
- Tools this guide uses
- Hypercorn ASGI server
- Caddy reverse proxy and web server with automatic HTTPS
- PostgreSQL relational database for Django's ORM
- systemd "daemon" (as it's called in Unix) to manage services
I'll assume that orpheus is your username and this is your directory structure:
- ~ (/home/orpheus)
- project
- manage.py
- ...
- static
- project
- static
- media
- project
- Caddyfile
- .config
- ...
- project
Getting ready
First, get a shell to Nest. Don't have a Nest account?
ssh orpheus@hackclub.appGet Nest resources
ssh orpheus@hackclub.app
export PROJECT_NAME="your project directory name" # set this to your project's directory name (like "project" in <code>/home/$USERNAME/project</code>)hackclub.app or custom domain?
$PROJECT_NAME.$USERNAME.hackclub.app (free)
export PROJECT_DOMAIN=$PROJECT_NAME.$USERNAME.hackclub.app
nest caddy add $PROJECT_DOMAINCustom domain (looks better, but you need your own DNS)
Add a CNAME record to $USERNAME.hackclub.app
export PROJECT_DOMAIN="hello.example.com" # set thisGet your project on Nest
Copy the directory containing manage.py to /home/$USERNAME/$PROJECT_NAME. See Quickstart#Using_the_Account.
cd ~/$PROJECT_NAME