Changeset - 5047e2f68b16
[Not reviewed]
0 1 0
Ben Sturmfels (bsturmfels) - 6 months ago 2023-10-26 02:22:45
ben@sturm.com.au
Extend docs for local development and production deploy
1 file changed with 19 insertions and 2 deletions:
README.md
19
2
0 comments (0 inline, 0 general)
README.md
Show inline comments
...
 
@@ -33,15 +33,32 @@ exist** on disk for the redirect to be applied.
 

	
 
## Local development
 

	
 
Python dependencies are tied to the versions available in Debian.
 
Python dependencies in `requirements.txt` are tied to the versions available in
 
Debian:
 

	
 
    python3 -m pip install -r requirements.txt
 
    cd www
 

	
 
You'll need a copy of `conservancy/djangocommonsettings.py`, a file that not
 
committed to the repository that has database settings and other
 
environment-specific config.
 

	
 
Then run:
 

	
 
    python manage.py migrate
 
    python manage.py runserver
 

	
 
There is also a Dockerfile available if that's more convenient. See that file
 
for details.
 

	
 

	
 
## Deploying
 

	
 
Changes pushed to the https://k.sfconservancy.org/website repository are
 
automatically deployed to the production website by the `conservancy-www-update`
 
SystemD timer. See `systemd/conservancy-www-update.timer` for details.
 

	
 
The `migrate` and `collectstatic` commands are not run automatically. You may
 
need to run these if modifying the database schema or adding/moving static files:
 

	
 
    sudo -u www-data /var/www/venv-website/bin/python manage.py migrate
 
    sudo -u www-data /var/www/venv-website/bin/python manage.py collectstatic --link
0 comments (0 inline, 0 general)