Skip to content

Latest commit

 

History

History
31 lines (28 loc) · 964 Bytes

README.md

File metadata and controls

31 lines (28 loc) · 964 Bytes

How to run this project

Docker and docker compose are requiered in order to run this small django sample project. Steps to run the service:

  • Enter in the container:
sudo docker-compose run web bash
  • Run migrations
python manage.py makemigrations
python manage.py migrate
  • Start the API
sudo docker-compose up web

To create a new project run:

sudo docker-compose run web django-admin.py startproject app_name .

To connect directly in the db you can use one of the next commands: python manage.py dbshell sudo docker run -it --rm --link djangoapp_postgres_1:postgres --net djangoapp_default postgres psql -h postgres -U postgres

REFERENCES: