Before you begin, make sure you have Docker installed on your machine. If you don't have Docker installed, you can follow the instructions at Get Docker.
For those unfamiliar with Docker, you can find more information in the Docker Documentation.
-
Clone the repository:
git clone https://github.com/adamuremek/mentorship-program.git cd mentorship-program -
Run Docker Compose:
The first build may take a while as it downloads project dependencies.
https://github.com/adamuremek/mentorship-program --buildTo run in the background, use:
docker compose up -d --build -
Access the website:
Open your browser and navigate to http://localhost:8000/
-
Access the database:
By default, the database can be accessed at:
- Host:
localhost - Port:
7654 - Database:
development - User:
user - Password:
password
These values can be changed in
/docker/.envNote: By default, the database is flushed on every run to provide a clean slate for development. This means all data in the database will be deleted when the containers start. If you wish to retain data between runs, you can comment out the corresponding line in the
/docker/entrypoint.shscript. - Host:
-
To stop the containers, run:
docker compose down -
To view output from the containers:
docker compose logs -
To execute a command in a container
docker compose exec SERVICE COMMANDFor example:
docker compose exec web python manage.py makemigrations