diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ce801e2..e470e5a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -120,8 +120,8 @@ jobs: DATABASE_PASSWORD=${{ secrets.DATABASE_PASSWORD }} DATABASE_HOST=${{ secrets.DATABASE_HOST }} DATABASE_PORT=${{ secrets.DATABASE_PORT }} - REDIS_HOST: ${{ secrets.REDIS_HOST }} - REDIS_PORT: ${{ secrets.REDIS_PORT }} + REDIS_HOST=${{ secrets.REDIS_HOST }} + REDIS_PORT=${{ secrets.REDIS_PORT }} SECRET_KEY=${{ secrets.SECRET_KEY }} EMAIL_HOST=${{ secrets.EMAIL_HOST }} EMAIL_PORT=${{ secrets.EMAIL_PORT }} diff --git a/README.md b/README.md index 0e6974d..e4def3a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ [![Python](https://img.shields.io/badge/-Python-3776AB?style=flat&logo=Python&logoColor=yellow)](https://www.python.org/) [![Django REST Framework](https://img.shields.io/badge/-Django%20REST%20Framework-092E20?style=flat&logo=django&logoColor=white)](https://www.django-rest-framework.org/) [![PostgreSQL](https://img.shields.io/badge/-PostgreSQL-336791?style=flat&logo=PostgreSQL&logoColor=white)](https://www.postgresql.org/) +[![Redis](https://img.shields.io/badge/Redis-DC382D?style=flat&logo=Redis&logoColor=white)](https://redis.io/) [![Docker](https://img.shields.io/badge/-Docker-2496ED?style=flat&logo=Docker&logoColor=white)](https://www.docker.com/) [![Nginx](https://img.shields.io/badge/-Nginx-269539?style=flat&logo=Nginx&logoColor=white)](https://www.nginx.com/) [![Psycopg2-binary](https://img.shields.io/badge/-Psycopg2--binary-4169E1?style=flat)](https://pypi.org/project/psycopg2-binary/) @@ -23,10 +24,15 @@ ## How to run the project -1. Install [`Docker`](https://www.docker.com/) and [`Docker Compose`](https://docs.docker.com/compose/) -To get started with Melnichanka, you will need to have [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/) installed on your system. You can follow the instructions for your operating system here and here. +1. Install [`Docker`](https://www.docker.com/) + and [`Docker Compose`](https://docs.docker.com/compose/) + To get started with Melnichanka, you will need to have [Docker](https://www.docker.com/) + and [Docker Compose](https://docs.docker.com/compose/) installed on your system. You can follow + the instructions for your operating system here and here. -Once you have [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/) installed, follow these steps to start the project: +Once you have [Docker](https://www.docker.com/) +and [Docker Compose](https://docs.docker.com/compose/) installed, follow these steps to start the +project: - Clone the repository: @@ -34,24 +40,36 @@ Once you have [Docker](https://www.docker.com/) and [Docker Compose](https://doc git clone https://github.com/KroshkaByte/Melnichanka.git cd Melnichanka ``` + - Start the project from root directory: + ```sh docker-compose up -d --build ``` + - Open your web browser and navigate to http://localhost:80 to access the application. ## Project Description -Melnichanka is a web application designed to facilitate the process of submitting shipment applications to consignees. The application generates a package of documents required for shipment based on user input, including information about goods, brands, factories, and packages. +Melnichanka is a web application designed to facilitate the process of submitting shipment +applications to consignees. The application generates a package of documents required for shipment +based on user input, including information about goods, brands, factories, and packages. -The application is intended to be used by companies that need to submit shipment applications on a regular basis. By using Melnichanka, companies can streamline the process of generating the necessary documents, reduce errors, and save time and resources. +The application is intended to be used by companies that need to submit shipment applications on a +regular basis. By using Melnichanka, companies can streamline the process of generating the +necessary documents, reduce errors, and save time and resources. -The application includes a user-friendly interface that allows users to easily enter data and generate documents. The interface is designed to be intuitive and easy to use, even for users with little or no technical experience. +The application includes a user-friendly interface that allows users to easily enter data and +generate documents. The interface is designed to be intuitive and easy to use, even for users with +little or no technical experience. -Melnichanka is built using modern web technologies, including `Django`, a popular web framework for Python. The application is containerized using Docker and Docker Compose, making it easy to deploy and scale. - -Overall, Melnichanka is a powerful and flexible tool that can help companies save time and resources when submitting shipment applications. By automating the process of generating documents, Melnichanka can help companies reduce errors, improve efficiency, and focus on their core business. +Melnichanka is built using modern web technologies, including `Django`, a popular web framework for +Python. The application is containerized using Docker and Docker Compose, making it easy to deploy +and scale. +Overall, Melnichanka is a powerful and flexible tool that can help companies save time and +resources when submitting shipment applications. By automating the process of generating documents, +Melnichanka can help companies reduce errors, improve efficiency, and focus on their core business. ## Usage @@ -65,7 +83,8 @@ To use Melnichanka, follow these steps: ## Database Pre-population -To pre-populate the database with some initial data, you can use the provided script. This script utilizes the `Faker` library to generate fake data. +To pre-populate the database with some initial data, you can use the provided script. This script +utilizes the `Faker` library to generate fake data. Please follow the steps below to run the script: @@ -76,13 +95,17 @@ Please follow the steps below to run the script: ```sh python3 manage.py runscript faker_script ``` + Make sure `django-extensions` is installed and added to `INSTALLED_APPS` in your Django settings. -This command will execute the `faker_script` script, which will then populate the database with the generated data. +This command will execute the `faker_script` script, which will then populate the database with the +generated data. -Please note that the data generated by the Faker library is random and does not represent any real information. +Please note that the data generated by the Faker library is random and does not represent any real +information. -Ensure that your `virtual environment` is activated before running the commands, if you're using one. +Ensure that your `virtual environment` is activated before running the commands, if you're using +one. ## Documentation @@ -91,21 +114,27 @@ API documentation is available through Swagger UI and ReDoc. - [Swagger UI](https://dev-lymar.github.io/Melnichanka/melnichanka_swager_ui) - [ReDoc](https://dev-lymar.github.io/Melnichanka/melnichanka_redoc) -For local access, navigate to [`Swagger UI`](http://localhost:8000/api/schema/swagger-ui/) and [`ReDoc`](http://localhost:8000/api/schema/redoc/) in your browser after starting the project. +For local access, navigate to [`Swagger UI`](http://localhost:8000/api/schema/swagger-ui/) +and [`ReDoc`](http://localhost:8000/api/schema/redoc/) in your browser after starting the project. ## Testing -To run the tests, navigate to the root directory of the project (where the manage.py file is located) and run the following command: +To run the tests, navigate to the root directory of the project (where the manage.py file is +located) and run the following command: ```sh pytest . ``` + or + ```sh python3 -m pytest . ``` -- To run tests for a specific application (such as goods, logistics, users, etc.) use the following command: +- To run tests for a specific application (such as goods, logistics, users, etc.) use the following + command: + ```sh pytest goods pytest logistics @@ -113,6 +142,7 @@ pytest users pytest clients pytest makedoc ``` + ## Contributing We welcome contributions to Melnichanka. To contribute: