Skip to content

Commit

Permalink
Merge pull request yogeshojha#1432 from yogeshojha/hotfix/2.2.0_release
Browse files Browse the repository at this point in the history
2.2.0 Hotfix
  • Loading branch information
ChristopherZh-7 committed Oct 17, 2024
1 parent c935720 commit 9909f8d
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 19 deletions.
129 changes: 110 additions & 19 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ services:
- static_volume:/usr/src/app/staticfiles/
ports:
- "127.0.0.1:8000:8000"
- "0.0.0.0:17777:5678" # 外部 17777 映射到容器内部 5678

depends_on:
- db
- celery
Expand Down
1 change: 1 addition & 0 deletions web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ RUN chaos -update
COPY ./requirements.txt /tmp/requirements.txt
RUN pip3 install --upgrade setuptools==72.1.0
RUN pip3 install -r /tmp/requirements.txt --no-cache-dir
RUN pip install pydevd-pycharm==241.18034.82

# install eyewitness
RUN pip3 install --no-cache-dir fuzzywuzzy \
Expand Down
9 changes: 9 additions & 0 deletions web/debug_entrpoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# 应用数据库迁移
python3 manage.py migrate

# 如果需要,可以在这里添加其他初始化步骤

# 使用pydevd-pycharm启动Django开发服务器
python3 -m pydevd_pycharm --port 5678 --host 0.0.0.0 manage.py runserver 0.0.0.0:8000
5 changes: 5 additions & 0 deletions web/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
"""Django's command-line utility for administrative tasks."""
import os
import sys
import pydevd_pycharm

try:
pydevd_pycharm.settrace('192.168.1.102', port=17777, stdoutToServer=True, stderrToServer=True, suspend=False, trace_only_current_thread=False)
except:
print("Unable to connect to the remote debugger. Continuing without debugging.")

def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'reNgine.settings')
Expand Down

0 comments on commit 9909f8d

Please sign in to comment.