touch .envs/dvelopment.env
Here are the env vars you need, change the DB URL
ENV_LABEL=local
DJANGO_SECRET_KEY=""
DJANGO_DEBUG=False
POSTGRES_CONN_MAX_AGE=600
DATABASE_URL=postgres://dbmaster:dbmaster@postgres:5432/DB_NAME_CHANGE_ME
REDIS_URL=redis://redis:6379
CELERY_BEAT_SCHEDULER=django_celery_beat.schedulers:DatabaseScheduler
SUPABASE_JWT_SECRET=
SUPABASE_URL=
SUPABASE_JWT_ISSUER=
SUPABASE_JWT_ALGORITHMS=HS256
-
In a new terminal, run
docker compose up web
-
In a new terminal, run
docker compose exec postgres bash
-
Feel free to change dbmaster to whatever you want. NOTE: You will have to update the database URL
su postgres
psql
create user dbmaster with password 'dbmaster';
alter role dbmaster with superuser;
create database DB_NAME_CHANGE_ME;
grant all privileges on database DB_NAME_CHANGE_ME to dbmaster;
\q
-
In a new terminal, run
docker compose exect web bash
-
Run
python manage.py makemigrations
-
Run
python manage.py migrate
-
Stop the web service now, cancel running the service in the terminal or run
docker compose down
-
Run
docker compose up
TA DA app should be running on http://localhost