Skip to content

Rohitkkpandey/trade-motors

 
 

Repository files navigation

trade-motors

Build Status Requirements Status

A Django-based website for http://globaltrademotors.com

Prerequisites

Setting up the project

Using a Virtual Environment (Recommended)

Create a virtual environment trademotors and activate.

pip install virtualenv
virtualenv trademotors
cd trademotors
source bin/activate

Clone the repository

git clone git@github.com:sitture/trade-motors.git .

Install required packages

pip install -r requirements.txt

Running the Django server locally

Once the above packages are installed successfully, you should then be able to run the django server.

To run the application locally, open the file src/gp_cars/settings/local.py and set DEBUG to True.

cd src
python manage.py runserver

Running the Tests

From the src directory, run the below to execute tests.

python manage.py test

Running with Docker

If you are comfortable using Docker, you can build this image, run it using sqlite inner database or run it using docker compose along with a MySQL server.

Docker image

As you can imagine, the only command to build this image is:

docker build -t trade-motors:0.1.0 .

If the image fails on the building process, check out the log, could be failing tests.

Once the image is built, you can run it:

docker run -d -p 8000:8000 trade-motors:0.1.0

In addition, you can run the build tests any time after this with:

docker run trade-motors:0.1.0 python manage.py test

Docker Compose

You can run this image using the docker-compose.yml file. Using it you can test this application with a MySQL Server configuration. In order to get this stack running locally:

docker-compose up -d

This stack uses a .env file containing the environment variables needed to run both web and database server.

Contributing

If you'd like to contribute to this repo checkout the Contributing Guide which will get you up to speed with the way the project is set up.

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.3%
  • Dockerfile 0.7%