- Docker: https://docs.docker.com/get-docker/
- Docker-compose: https://docs.docker.com/compose/install/
# build and start project
docker-compose build
docker-compose up -d
# migrate database and setup for use
docker exec -it teamup_web python ./manage.py migrate
This will allow you to create and delete any object in the system from http://0.0.0.0:8000/admin
you can also set passwords on the User models
# start the database and server in the background
docker-compose up -d
docker exec -it teamup_web python manage.py createsuperuser
# Make sure all containers are not running
docker-compose down
#Start only the database container
docker-compose up -d db
#drop and recreate database
docker exec -it teamup_db psql -U testuser -d postgres -c "DROP DATABASE productiondb1;"
docker exec -it teamup_db psql -U testuser -d postgres -c "CREATE DATABASE productiondb1;"
docker exec -it teamup_web python ./manage.py migrate
Sometimes the database starts after the webserver causing the webserver to crash. This can be fixed by verifying this issue with docker-compose logs
. If you see this problem. Add a space anywhere in the code and save it. The server will restart and everything should be good.
# Start the database and server in the background
docker-compose up -d
docker exec -it teamup_web pytest --cov=. --cov-report=html app/tests/
docker-compose down
# start the database and server in the background
docker-compose up -d
# run from root of projects
cd ui-tests/; npm i && $(npm bin)/cypress run; cd -
# spin down the service if you are down
docker-compose down