RESTful api backend for carloteka.com
Clone the project
git clone git@github.com:Carloteka/carloteka-backend.git -b devGo to the project directory
cd carloteka-backendLinux
sudo docker-compose upWindows
docker-compose upAdd --force-recreate to the end if you want to rebuild container
Clone the project
git clone git@github.com:Carloteka/carloteka-backend.git -b devGo to the project directory
cd carloteka-backendCreate venv (on linux)
python3 -m venv venvActivate venv (on linux)
source venv/bing/activateInstall requirements
pip install -r requirements.txtBefore starting the server check the next section "Environment Variables" right below
Start the server
python manage.py runserverTo 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-backendRun tests:
pytest