A website designed to plan and share bouldering beta. Available at betaspray.net! Try it out, let me know what you think.
Run the stack with:
docker-compose up
While not necessary for development, it's helpful to install dependencies outside of Docker so your editor can access them and do typechecking/autocomplete.
cd api
pyenv install
poetry install # Installs dependencies to api/.venv/
If you want to enable Google logins, you'll need to add Google OAuth client creds:
- Go here
- If you don't have access to the Google Project, sorry :/
- Click Create Credentials > OAuth client ID
- Application type = Web application
- Name = Something descriptive
- Authorized JavaScript origins =
http://localhost:3000
- Authorized redirect URIs =
http://localhost:3000/api/social/complete/google-oauth2/
- Save
- In the repo:
cp example.env .env
- Copy in the client ID and secret
Requires nvm.
cd ui
nvm install
nvm use
npm install
The API container will automatically start debugpy
and expose it on port 8001. There is already a VSCode debug config defined to attach to this (called Attach to Django
). This should allow you to breakpoint and debug code from within VSCode. If you've installed dependencies locally (using steps above), VSCode should automatically load them and they should match the path layout used inside the container, meaning you can breakpoint dependency code as well.
If you want to breakpoint something that runs during startup, you can attach the debugger, then trigger a reload by saving any file. The debugger should remain attached through the reload and hit any breakpoints in startup code.
If you make model changes, you can generate/apply migrations with:
api/m.sh makemigrations
api/m.sh migrate
https://docs.djangoproject.com/en/4.0/topics/migrations/
Deployed via Kubernetes on the Keskne cluster. Deployment is run automatically on merge to master
via this CI job into two environments:
Environment | Namespace | Domain | When |
---|---|---|---|
Development | beta-spray-dev |
dev.betaspray.net | Manually |
Production | beta-spray |
betaspray.net | Push to master |
See the deployment-specific README for more info.