. ├── app/ │ ├── apps/ │ │ ├── chat/ │ │ ├── group_chat/ │ │ ├── notification/ │ │ ├── user/ │ │ ├── videocall/ │ │ └── util.py │ ├── docs/ │ ├── mediafiles/ │ ├── staticfiles/ │ ├── telezap_django/ │ ├── templates/ │ ├── db.sqlite3 │ ├── Dockerfile │ ├── Dockerfile.prod │ ├── entrypoint.prod.sh │ ├── entrypoint.sh │ ├── manage.py │ └── requirements.txt ├── ngix/ │ ├── Dockerfile │ └── nginx.conf ├── venv/ ├── docker-compose.prod.yml ├── docker-compose.yml ├── .dockerignore ├── .env ├── .env.prod ├── .env.prod.db ├── .gitignore └── README.md
DEBUG = `True` SECRET_KEY = `<string>` DJANGO_ALLOWED_HOSTS = `localhost 127.0.0.1 [::1]`
DEBUG = `False` SECRET_KEY = `<string>` DJANGO_ALLOWED_HOSTS = `<string_list>` SQL_ENGINE = `django.db.backends.postgresql` SQL_DATABASE = `<string: database name>` SQL_USER = `<string>` SQL_PASSWORD = `<string>` SQL_HOST = `db` SQL_PORT = `5432` DATABASE = `postgres`
POSTGRES_USER = `<string: equals to .env.prod SQL_USER>` POSTGRES_PASSWORD = `<string: equals to .env.prod SQL_PASSWORD>` POSTGRES_DB = `<string: equals to .env.prod SQL_DATABASE>`
- RUN
python -m venv venv
- RUN Windowns:
venv/bin/activate.bat
| Linux:source venv/bin/activate
- RUN
pip install -r requirements.txt
- RUN
python ./app/manage.py migrate
- RUN
python ./app/manage.py runserver
- Go to http://localhost:8000 in browser
- RUN
docker-compose up -d --build
- Go to http://localhost:8000 in browser
- RUN
docker-compose -f docker-compose.prod.yml up -d --build
- Go to http://localhost:1337 in browser
- RUN
docker exec -it telezap_django-web-1 bash
- RUN
docker container stop telezap_django-web-1
- RUN
docker container stop telezap_django-db-1
(IF RUN IN PROD)- RUN
docker rm telezap_django-web-1
- RUN
docker rm telezap_django-db-1
(IF RUN IN PROD)- RUN
docker rmi telezap_django-web
- RUN
docker volume remove telezap_django_postgres_data
(IF RUN IN PROD)- RUN
docker network remove telezap_django_default
- RUN
python manage.py test apps/*/
- RUN
python manage.py test apps/<app_name>/
APPS NAMES: user | notification | chat | group_chat | videocall