Skip to content

Latest commit

 

History

History
126 lines (76 loc) · 1.8 KB

README.md

File metadata and controls

126 lines (76 loc) · 1.8 KB

carloteka-backend

RESTful api backend for carloteka.com

Badges

MIT License

Authors

Run Docker container

Clone the project

  git clone [email protected]:Carloteka/carloteka-backend.git -b dev

Go to the project directory

  cd carloteka-backend

Activate docker

Linux

    sudo docker-compose up

Windows

    docker-compose up

Add --force-recreate to the end if you want to rebuild container

Run Locally

Clone the project

  git clone [email protected]:Carloteka/carloteka-backend.git -b dev

Go to the project directory

  cd carloteka-backend

Create venv (on linux)

  python3 -m venv venv

Activate venv (on linux)

  source venv/bing/activate

Install requirements

  pip install -r requirements.txt

Before starting the server check the next section "Environment Variables" right below

Start the server

  python manage.py runserver

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

File direction /vscubing-backend/.env

export SECRET_KEY = 'django-key'

export DEBUG = 1 # 1 == True, 0 == False

export GOOGLE_REDIRECT_URL = 'http://127.0.0.1:3000'

export ALLOWED_HOSTS = '["127.0.0.1", "127.0.0.1:8000", "0.0.0.0:8000", "192.168.1.7"]'

export DEVELOPMENT = 1

export PRODUCTION = 0

#### only in production needed for database

export DB_NAME = dbname

export DB_USER = dbusername

export DB_PASSWORD = Password

Run Tests

Go to the project directory

  cd carloteka-backend

Run tests:

  pytest

Documentation

API docs