-
Notifications
You must be signed in to change notification settings - Fork 1
Examples
Noah S. Roberts edited this page Nov 16, 2024
·
2 revisions
- Remove old term(s) (optional)
rm -r /django/spring24
# or, to remove multiple at a time
rm -r /django/{fall23,spring24} # don't include quotation marks!
- Create new term
mkdir /django/fall24
- Add groups to that term
create-group fall24 group1
# or, to create multiple at a time
create-group fall24 "group{1..3}" # include quotation marks!
# "{1..3}" means "1 to 3" (inclusive start and end) in Bash
-
cd
to /django/source - Run
deploy
(usage) in this folder. It should recognize the presence of 'docker-compose.traefik.yml' and let you interact with it.
- Navigate to your group's folder with
cd
.
cd /django/fall24/group1
Warning
If you were going to clone your repo, stop. The next step handles that for you. WDH (this thing) expects a very specific file and folder structure to work, so it's easier if you let it clone your repo itself.
- Before doing anything else, Prepare your group's folder. Do not skip this step! You will not be able to start your group's Docker Compose stack (defined in docker-compose.site.yml) until you run this.
deploy prep
# it'll walk you through a few steps to get your folder set up, including cloning your repo for you.
- Start the stack!
deploy start site
- You'll need to set up a superuser now, as this deployment uses a PostgreSQL (or just Postgres) server that was literally just started in step 3. Thankfully, with
deploy
, it's super easy. Usedeploy manage
in place ofpython manage.py
and run commands as normal.
deploy manage createsuperuser
If you just need to run commands with 'manage.py', use
deploy manage
in its place.
If you need to run commands in the terminal, a less friendly syntax is needed. For example, to check if the Postgres container is running and Postgres itself is ready, you would run:
deploy exec site postgres -u pguser -d pgdb -h localhost
See a term or technology you don't know? The glossary might.