#Backend Project project based on django
##how to setup project
###docker-compose
you can use command docker-compose up --build to run project all by compose component.
in this case if you would like to create superuser for your self you should do below instructions:
- use command
docker psto find backend_backend image container_id. suppose it isabcdef. - use command
docker exec -it abcdef /bin/bashto go to its container. - use command
./manage.py createsuperuserto create a super user. - follow the steps that come to you. e.g. enter name, email, password, ...
- after these steps you can go to url localhost:8000/admin and login to your admin panel with the username and password that you choose for you superuser.
###local in this case you should comment out backend servis in docker-compose and leave db servis behind. then follow the instruction below:
- use command
docker-compose up --buildto run postgres database. - use command
./manage.py migrateto migrate the database migration files. - use command
./manage.py runserver 127.0.0.1:8000to run django project. in the case you need to create superuser just do step 3 in previous section(docker-compose section).