Skip to content

Commit

Permalink
LilSholex 5.6
Browse files Browse the repository at this point in the history
- Updated to Python 3.11.2
- Updated Python packages
- Updated RabbitMQ, Memcached, MySQL and Nginx
- Added inline ModelAdmin for Username and RecentMeme to User ModelAdmin
  • Loading branch information
RealNitroZeus committed Apr 2, 2023
1 parent 9b30465 commit e437e36
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 34 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11.0
FROM python:3.11.2

# Setting working directory
WORKDIR /home/sholex
Expand Down
16 changes: 8 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.8"
services:
db:
image: mysql:8.0.31
image: mysql:8.0.32
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD_FILE: "/run/secrets/db_password"
Expand Down Expand Up @@ -48,7 +48,7 @@ services:
- source: mysql_2
target: /etc/mysql/conf.d/mysql.cnf
rabbitmq:
image: rabbitmq:3.11.2
image: rabbitmq:3.11.10
healthcheck:
test: "rabbitmq-diagnostics -q ping"
interval: 10s
Expand Down Expand Up @@ -87,7 +87,7 @@ services:
- source: rabbitmq
target: /etc/rabbitmq/rabbitmq.conf
nginx:
image: ghcr.io/sholex-team/nginx:4.0
image: ghcr.io/sholex-team/nginx:4.1
networks:
- nginx_lilsholex
ports:
Expand Down Expand Up @@ -145,7 +145,7 @@ services:
- ssl_key
- dhparam
lilsholex:
image: ghcr.io/sholex-team/lilsholex:5.5
image: ghcr.io/sholex-team/lilsholex:5.6
networks:
- db_django
- nginx_lilsholex
Expand Down Expand Up @@ -197,7 +197,7 @@ services:
window: 10s
delay: 5s
celery: &celery_base
image: ghcr.io/sholex-team/lilsholex:5.5
image: ghcr.io/sholex-team/lilsholex:5.6
command: "celery -A LilSholex worker -Q celery -l info -c 2 -E"
networks:
- db_django
Expand Down Expand Up @@ -259,7 +259,7 @@ services:
- internet
- tasks_django
lilsholex_broadcasts:
image: ghcr.io/sholex-team/lilsholex:5.5
image: ghcr.io/sholex-team/lilsholex:5.6
command: "python manage.py process_broadcasts"
networks:
- db_django
Expand Down Expand Up @@ -301,7 +301,7 @@ services:
window: 10s
delay: 5s
memcached:
image: memcached:1.6.17
image: memcached:1.6.19
command: "memcached -m 256"
networks:
- cache_django
Expand Down Expand Up @@ -330,7 +330,7 @@ services:
monitor: 10s
order: start-first
lilsholex_migrations:
image: ghcr.io/sholex-team/lilsholex:5.5
image: ghcr.io/sholex-team/lilsholex:5.6
command: "bash -c 'yes | python manage.py makemigrations persianmeme && \
yes | python manage.py migrate && python manage.py collectstatic --noinput'"
secrets:
Expand Down
13 changes: 13 additions & 0 deletions persianmeme/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ def count_reporters(obj: models.Report):
return obj.reporters.count()


class UsernameInline(admin.TabularInline):
extra = 0
model = models.Username
readonly_fields = ('creation_date',)


class RecentMemeInline(admin.TabularInline):
extra = 0
model = models.RecentMeme
raw_id_fields = ('meme',)


@admin.register(models.User)
class User(admin.ModelAdmin):
@admin.display(description='Ban')
Expand Down Expand Up @@ -131,6 +143,7 @@ def unban_user(self, request: HttpRequest, queryset):
('Memes', {'fields': ('playlists',)}),
('Temporary Values', {'fields': ('temp_meme_name', 'temp_user_id', 'temp_meme_tags')})
)
inlines = (UsernameInline, RecentMemeInline)


@admin.register(models.Meme)
Expand Down
49 changes: 24 additions & 25 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,58 +1,57 @@
aiodns==3.0.0
aiohttp==3.8.3
aiohttp==3.8.4
aiosignal==1.3.1
amqp==5.1.1
asgiref==3.5.2
asgiref==3.6.0
asn1crypto==1.5.1
astroid==2.12.13
astroid==2.15.1
async-timeout==4.0.2
attrs==22.1.0
autobahn==22.7.1
attrs==22.2.0
autobahn==23.1.2
Automat==22.10.0
brotlipy==0.7.0
celery==5.2.7
certifi==2022.9.24
certifi==2022.12.7
cffi==1.15.1
chardet==5.0.0
chardet==5.1.0
click==8.1.3
click-didyoumean==0.3.0
click-plugins==1.1.1
click-repl==0.2.0
constantly==15.1.0
cryptography==38.0.3
Django==4.1.3
cryptography==40.0.1
Django==4.1.7
flower==1.2.0
frozenlist==1.3.3
gunicorn==20.1.0
humanize==4.4.0
humanize==4.6.0
hyperlink==21.0.0
incremental==22.10.0
isort==5.10.1
kombu==5.2.4
lazy-object-proxy==1.8.0
lazy-object-proxy==1.9.0
mccabe==0.7.0
multidict==6.0.2
multidict==6.0.4
mysqlclient==2.1.1
prometheus-client==0.15.0
prompt-toolkit==3.0.33
prometheus-client==0.16.0
prompt-toolkit==3.0.38
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycares==4.2.2
pycares==4.3.0
pycparser==2.21
PyHamcrest==2.0.4
pymemcache==4.0.0
pyOpenSSL==22.1.0
pytz==2022.6
requests==2.28.1
pyOpenSSL==23.1.1
pytz==2023.3
requests==2.28.2
service-identity==21.1.0
six==1.16.0
sqlparse==0.4.3
toml==0.10.2
tornado==6.2
txaio==22.2.1
urllib3==1.26.13
txaio==23.1.1
urllib3==1.26.15
vine==5.0.0
wcwidth==0.2.5
wrapt==1.14.1
yarl==1.8.1
zope.interface==5.5.2
wcwidth==0.2.6
wrapt==1.15.0
yarl==1.8.2
zope.interface==6.0

0 comments on commit e437e36

Please sign in to comment.