This is the repo for the code.
Run pytest
on the main directory and watch the tests complete.
Run gunicorn app
on the main directory.
curl 127.0.0.1:8000/api/login -XPOST -d '{"username":"<username>", "password":"<password>"}' -H 'Content-type: application/json'
curl 127.0.0.1:8000/api/user -XPOST -H "Content-Type:application/json" -d '{"username":"<username>", "password":"<password>", "email":"<email>"}'
curl 127.0.0.1:8000/api/user -H 'Authentication-Token: <token>'
curl 127.0.0.1:8000/api/tasks -XPOST -H "Authentication-Token: <token>" -H 'Content-Type:application/json' -d '{"title":"<title>", "due_date":"<due_date>", "points":<points_int>, "difficulty":"<difficulty>"}'
curl 127.0.0.1:8000/api/tasks -H 'Authentication-Token: <token>'
docker run --restart=always --name pawtaskspsql --net pawtasksdev -p 10.12.0.42:5432:5432 -d -e POSTGRES_PASSWORD=<password> postgres
docker run -it -d --env-file <filepath> -p 10.12.0.42:8000:8000 --net pawtasksdev <img>
Run the build command from the parent directory so that the files can be copied into the Docker images.
docker build -f docker-app/Dockerfile .
Requires logging into DockerHub so that you can access the private images.
Create the terraform.tfvars
files and add the required variables.
terraform plan
terraform apply