Skip to content

Commit

Permalink
fix main.yml redis variables, readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-lymar committed Jun 5, 2024
1 parent 2992215 commit b389b3c
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
62 changes: 46 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -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/)
Expand All @@ -23,35 +24,52 @@

## 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:

```sh
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

Expand All @@ -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:

Expand All @@ -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

Expand All @@ -91,28 +114,35 @@ 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
pytest users
pytest clients
pytest makedoc
```

## Contributing

We welcome contributions to Melnichanka. To contribute:
Expand Down

0 comments on commit b389b3c

Please sign in to comment.