Source for my dev site. Intended to be a gallery and playground.
You'll need:
- Python 3.8 or greater.
- Google Cloud SDK
- Pipenv
In order to keep secrets out of source, we place them in local files not included in source control. Django and postgres requires secrets, and they vary based on the deploy environment. Make sure you add the .env file and the env_variables.yaml file. See cgsite/env_var_service.py for list of required env variables.
We utilize pipenv's env file to inject environment secrets to our local deployment.
GCP Deploy will inject environment secrets via the env_variables.yaml file.
Set environment variables in .env
to your local postgresql instance. Step into the directory in your terminal and run pipenv install
then run pipenv shell
- Validate environment variables in
.env
to your local postgresql instance. SetCG_SITE_DEPLOY_ENV=local
- Activate pipenv by running
pipenv shell
- Ensure postgres is running locally (if not, run
sudo service postgresql start
) - Run SCSS compiler in watch mode
sass --watch styles/:cgsite/static/css/
- Run
python manage.py runserver
- Create env_variables_prod.yaml if necessary
- run deploy.sh
- Switch to ASGI to enable websockets applications.
- Plug in Aji.
Enable Development Blog.- Glitchart Gallery.
- Resume Page.
Github- Store static files on GStorage
Get CMS wagtail- Enable Wagtail Codeblocks
- Enable Wagtail Musicblocks
- Enable Search/Tagging for Content Pages
- Testing in Django
- Realtime Glitchart, like Processing
- cgsite -- The main django application folder
- toplevel -- Where toplevel, non-important, misc stuff go. This is where I would route to 1 page experiments
- cms -- Anything workable in cms. e.g. Blogs, style guides, etc.