RESTful api backend for carloteka.com
Clone the project
git clone [email protected]:Carloteka/carloteka-backend.git -b dev
Go to the project directory
cd carloteka-backend
Linux
sudo docker-compose up
Windows
docker-compose up
Add --force-recreate
to the end if you want to rebuild container
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
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
Go to the project directory
cd carloteka-backend
Run tests:
pytest