Author: Rachet M
- Create a
.envfile in the root directory and add the all the variables in the.env.examplefile. - Since the default username and password for the database in the docker db container is
postgresandpostgres, the same is used.
- Navigate to
/deploymentdirectory from project root - Run
bash deploy.sh- This will build the docker image and run the containers using docker-compose
- The database for the app i.e.
ecommerceand the test database i.e.ecommerce_testwill be created once the db container starts and the initial migrations will also be run on the database.
- The app will be running on
http://localhost:8000 - The api documentation can be accessed at
http://localhost:8000/api/docs
- Execute the following command from the terminal after deployment on docker -
This will run all the tests in the app.
docker exec -it ecom-service pytest