#TeamsQnA
This repository contains the REST API of the Arch|TeamsQnA web application.
##Environment Setup
-
Clone the repository.
-
Navigate to the project root directory
-
Down the containers if they are up already
docker-compose down -v
-
Build and up the containers
docker-compose -f docker-compose.prod.yml up -d --build
-
Run the migrations
docker-compose -f docker-compose.prod.yml exec archteamsqnaapiweb python manage.py migrate --noinput
-
Collect and copy the static files
docker-compose -f docker-compose.prod.yml exec archteamsqnaapiweb python manage.py collectstatic --no-input --clear
-
Build and up the containers
docker-compose up -d --build
-
Login to the archteamsqnaapiweb container,
docker exec -it arch-teams-qna-api_archteamsqnaapiweb_1 /bin/ash
-
Create a superuser
python manage.py createsuperuser
-
Codebase is found inside the
/usr/src/app
directory of the container. -
Access the application through http://127.0.0.1:8000/
-
Check logs by executing (on host machine),
docker-compose logs -f