-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed various bugs in bot logic. - Switched over to Celery for handling background tasks. - Improved Nginx configuration. - Updated Django, Nginx and various other packages to their latest versions. - Improved docker-compose configuration. - Added new rabbitmq service with its configuration file. - Added missing help_messages.json secret file. - Added celery_flower service for monitoring celery tasks in web environment. - Using Python 3.10.1 as base image of lilsholex.
- Loading branch information
1 parent
66c0c74
commit 9ab6113
Showing
23 changed files
with
309 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
FROM python:3.10.0 | ||
FROM python:3.10.1 | ||
# Addding requirements | ||
COPY requirements.txt requirements.txt | ||
RUN pip install -U pip && pip install -r requirements.txt --no-cache-dir | ||
# Setting working directory | ||
WORKDIR /home/sholex | ||
RUN mkdir static | ||
RUN mkdir state | ||
RUN mkdir healthchecks | ||
# Healthcheks | ||
COPY healthchecks/gunicorn.py healthchecks/gunicorn.py | ||
# Adding Static Directory | ||
RUN mkdir static | ||
# Copying source | ||
COPY LilSholex LilSholex | ||
COPY templates templates | ||
COPY manage.py manage.py | ||
COPY persianmeme persianmeme | ||
# Setting Volumes | ||
VOLUME /home/sholex/persianmeme/migrations | ||
# Running | ||
CMD gunicorn --workers=2 --bind=0.0.0.0:80 --access-logfile /dev/null --error-logfile /dev/stderr LilSholex.wsgi | ||
CMD gunicorn --workers=2 --bind=0.0.0.0:80 --error-logfile /dev/stderr -t 15 LilSholex.wsgi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from .celery import celery_app | ||
|
||
__all__ = ('celery_app',) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import os | ||
from celery import Celery | ||
|
||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'LilSholex.settings') | ||
celery_app = Celery('LilSholex') | ||
celery_app.config_from_object('django.conf:settings', namespace='CELERY') | ||
celery_app.autodiscover_tasks() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[mysqld] | ||
innodb_buffer_pool_chunk_size=536870912 | ||
innodb_buffer_pool_instances=4 | ||
innodb_buffer_pool_size=2147483648 | ||
key_buffer_size=1073741824 | ||
innodb_buffer_pool_chunk_size=335544320 | ||
innodb_buffer_pool_instances=8 | ||
innodb_buffer_pool_size=2684354560 | ||
key_buffer_size=2684354560 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
consumer_timeout = 28800000 |
Oops, something went wrong.