This repository contains the Backend API endpoint for CubeSeed
You need the following tools to set up the project:
- Django
- Django Rest Framework
- Python
-
Open Command Prompt on your local computer.
-
Clone the repository by clicking on
Code
option on top left of the main repository.
git clone https://github.com/Cubeseed/Backend.git
- Navigate to the project directory.
cd Backend
- Set up and Activate your virtual environment
python3 -m venv env
source env/bin/activate - # For Mac/Linux
env\Scripts\activate - # For Windows
- Install all project dependencies.
pip install -r requirements.txt
- Migrate database
python manage.py migrate
- Run the project server locally.
python manage.py runserver
- Access the live development server at localhost:8000/swagger.
python manage.py test
If you have docker installed and know how to run it from the command line:
docker run -it -dp 8000:8000 sebastiangh/cubeseed
Guide on how to run docker images
Look for the =sebastiangh/cubeseed= image: [[https://hub.docker.com/r/sebastiangh/cubeseed]] Run with the following settings:
- Name: Any name
- Host Port: =8000=
- Container Port: =8000=
Look for the postgres image: https://hub.docker.com/_/postgres. Run with the following settings:
- Name: whatever
- Host Port: =5432=
- Container Port: =5432=
- Environment:
- POSTGRES_PASSWORD=cubeseedsecret=
- POSTGRES_USER=cubeseed=
- POSTGRES_DB=cubeseedapi=
docker build -t cubeseed . -f docker/Dockerfile
# tag not necessary if already done before
docker tag cubeseed sebastiangh/cubeseed
docker push sebastiangh/cubeseed
All new features, enhancements, bug fixes must be added as an issue before opening a PR.