onnow.io is a Ghost Kitchen D2C platform intends to help SME restaurants. This is the Back-end API server repo of the SaaS platform.
-
Download docker-compose.yml file
-
Directory hierarchy
OnnowApp
|_ onnow.io
|_ docker-compose.yml
- Run the following commands:
docker-compose build (for the first time)
docker network create onnow (for the first time)
docker-compose up onnow-postgres
docker-compose up onnow-app-server
docker-compose up redis
docker-compose up celery
docker exec -it onnow-app-server bash (to enter the app container bash)
# Run The Following Commands
1.Use this command python manage.py makemigrations users
2.Use this command python manage.py makemigrations brands
3.Use this command python manage.py makemigrations customer
4.Use this command python manage.py makemigrations customer_auth
4.Use this command python manage.py makemigrations discounts
5.Use this command python manage.py makemigrations orders
6.Use this command python manage.py makemigrations outlets
use this command> python manage.py migrate
How to Db Setup Without docker locally?
Our Main App is Onnow there is file which is db_config.py there
is a logical conditions which is locally and production setups
setup your own db setup
in this app this is a Django Custom user all types of users end point like admin,customer,brand-manager,outlet-manager
are associated this app
|-CustomUser Manager> username==email.
|-Customer Username==phone number.
there is four(4) types of users
USER_TYPE_CHOICES = [
('ACO', 'AC_Owner'),
('MGR', 'Manager'),
('STF', 'Outlet_Manager'),
('CUS', 'Customer')
]
to load data:
python manage.py loaddata fixtures/model_name.json --app app.model_name
to dump data:
python manage.py dumpdata app.model_name --indent 4 > fixtures/model_name.json