Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammadali-Akbarov committed Jun 17, 2024
1 parent 84ce944 commit f8319c7
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ __pycache__/
venv/
.env
test.py
celerybeat-schedule.db
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ Support Group - <a href="https://t.me/+bYouuOlqt1c3NmYy">Telegram</a><br>
* 2 - Setting up environment variables
- ```cp .env.dist .env```
* 3 - RUN Project the following commands
- ```make setup```
- ```make run.image``` - run with docker
* 4 - Run the following commands without docker
- ```python3 -m venv venv```
- ```source venv/bin/activate``` or ```./venv/scripts/activate```
- ```pip3 install -r requirements.txt```
- ```uvicorn main:app --port ${SERVICE_PORT}``` run bot
- ```celery -A app.bot.services.external.celery.tasks worker -l INFO``` run celery worker
- ```celery -A app.bot.services.external.celery.tasks beat -l INFO``` run celery beat


## Technologies Used
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,17 @@ services:
redis:
image: redis:latest
container_name: redis
ports:
- 6379:6379
volumes:
- redis_data:/data

db:
image: postgres:14
container_name: postgres_db
ports:
- 5432:5432

environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USERNAME}
Expand Down
11 changes: 10 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
setup:
run.image:
docker-compose down
docker-compose up --build

run.bot:
uvicorn main:app --port ${SERVICE_PORT} --host 0.0.0.0

run.celery.worker:
celery -A app.bot.services.external.celery.tasks worker --loglevel=info --concurrency=1 --queues=example_queue

run.celery.beat:
celery -A app.bot.services.external.celery.tasks beat -l INFO

logs:
docker-compose logs

0 comments on commit f8319c7

Please sign in to comment.