dapino / simple

Simple REST API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SIMPLE Api 🚀

Use this project to start a Djando Project with PosgreSQL.

Clone with:

git clone https://github.com/iraidamercedes/django_base_project.git

Create a .env.dev file in the root folder and set the values for the following parameters:

DEBUG=1
SECRET_KEY=
DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
SQL_ENGINE=django.db.backends.postgresql
SQL_DATABASE=
SQL_USER=
SQL_PASSWORD=
SQL_HOST=db
SQL_PORT=5432

Buld the image with:

docker-compose build

Run the cointainer:

docker-compose up

To run the migrations use the following instruction:

docker-compose exec web python manage.py migrate --noinput

The following commands will be useful in the deployment of the project when is running on docker:

#Stablish the migrations
docker-compose exec api python manage.py makemigrations

#Make the migrations
docker-compose exec api python manage.py migrate

#Create admin user
docker-compose exec api python manage.py createsuperuser

About

Simple REST API


Languages

Language:JavaScript 47.4%Language:CSS 44.7%Language:Python 7.8%Language:Dockerfile 0.2%