diff --git a/README.md b/README.md index 19ee277ff..1692e3d0c 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ - [Work Methodology](/docs/work-methodology.md) - [Useful Commands](/docs/useful-commands.md) - [Technologies used on Samf4 🤖](/docs/technical/Samf4Tech.md) +- [Project Specific Commands](/docs/docker-project-specific-commands.md) - [Useful Docker aliases](/docs/docker-project-specific-commands.md) ## Installation diff --git a/docs/technical/backend/seed.md b/docs/technical/backend/seed.md index cf118cb9d..d9f002a55 100644 --- a/docs/technical/backend/seed.md +++ b/docs/technical/backend/seed.md @@ -4,9 +4,9 @@ Seed scripts are used to populate the database with dummy data for testing. Seed scripts are located in `root/management/commands/seed_scripts/`. -### Seeding commands +### Seeding locally -To seed the database locally, run this in terminal: +To seed the database **locally**, run this in terminal: - `python manage.py seed` @@ -19,19 +19,18 @@ For instance, to seed events run: - `python manage.py seed events` ### Seeding in docker - -After docker container is running, send command to the container: - + +After docker container is running: -- Go into docker: `docker exec backend bash` -- Enable pipenv: `pipenv shell` -- Run seed script: `python manage.py seed` +- 1) Open shell in Docker container: `docker compose exec backend bash` +- 2) Enable pipenv: `pipenv shell` +- 3) Run seed script: `python manage.py seed` -### Adding/changing seed scripts +### Adding/changing seed scripts The seed script `seed.py` does not need to be modified to add new seed scripts. Instead, add scripts inside the `seed_scripts/` folder. In order for them to be detected, you must include it in the `seed_scripts/__init__.py` file: