mirror of https://github.com/jumpserver/jumpserver
Merge pull request #6932 from jumpserver/pr@dev@perf_remove_djangopo
perf: 去掉django.popull/6967/head
commit
476e6cdc2f
|
@ -39,4 +39,5 @@ logs/*
|
|||
.vagrant/
|
||||
release/*
|
||||
releashe
|
||||
django.mo
|
||||
/apps/script.py
|
||||
|
|
|
@ -35,12 +35,14 @@ RUN mkdir -p /root/.ssh/ \
|
|||
&& echo "Host *\n\tStrictHostKeyChecking no\n\tUserKnownHostsFile /dev/null" > /root/.ssh/config
|
||||
|
||||
RUN mkdir -p /opt/jumpserver/oracle/ \
|
||||
&& wget https://download.jumpserver.org/public/instantclient-basiclite-linux.x64-21.1.0.0.0.tar \
|
||||
&& wget https://download.jumpserver.org/public/instantclient-basiclite-linux.x64-21.1.0.0.0.tar > /dev/null \
|
||||
&& tar xf instantclient-basiclite-linux.x64-21.1.0.0.0.tar -C /opt/jumpserver/oracle/ \
|
||||
&& echo "/opt/jumpserver/oracle/instantclient_21_1" > /etc/ld.so.conf.d/oracle-instantclient.conf \
|
||||
&& ldconfig \
|
||||
&& rm -f instantclient-basiclite-linux.x64-21.1.0.0.0.tar
|
||||
|
||||
RUN cd apps && python manage.py compilemessages
|
||||
|
||||
RUN echo > config.yml
|
||||
VOLUME /opt/jumpserver/data
|
||||
VOLUME /opt/jumpserver/logs
|
||||
|
|
|
@ -10,5 +10,6 @@ class CommonConfig(AppConfig):
|
|||
def ready(self):
|
||||
from . import signals_handlers
|
||||
from .signals import django_ready
|
||||
if 'migrate' not in sys.argv:
|
||||
django_ready.send(CommonConfig)
|
||||
if 'migrate' in sys.argv or 'compilemessages' in sys.argv:
|
||||
return
|
||||
django_ready.send(CommonConfig)
|
||||
|
|
Binary file not shown.
11
jms
11
jms
|
@ -100,9 +100,20 @@ def collect_static():
|
|||
logging.info("Collect static files done")
|
||||
|
||||
|
||||
def compile_i81n_file():
|
||||
django_mo_file = os.path.join(BASE_DIR, 'apps', 'locale', 'zh', 'LC_MESSAGES', 'django.mo')
|
||||
if os.path.exists(django_mo_file):
|
||||
return
|
||||
os.chdir(os.path.join(BASE_DIR, 'apps'))
|
||||
_cmd = 'python3 manage.py compilemessages --no-input -c &> /dev/null '
|
||||
subprocess.call(_cmd, shell=True)
|
||||
logging.info("Compile i18n files done")
|
||||
|
||||
|
||||
def upgrade_db():
|
||||
collect_static()
|
||||
perform_db_migrate()
|
||||
collect_static()
|
||||
|
||||
|
||||
def prepare():
|
||||
|
|
|
@ -1 +1 @@
|
|||
g++ make iputils-ping default-libmysqlclient-dev libpq-dev libffi-dev libldap2-dev libsasl2-dev sshpass
|
||||
g++ make iputils-ping default-libmysqlclient-dev libpq-dev libffi-dev libldap2-dev libsasl2-dev sshpass gettext
|
||||
|
|
|
@ -1 +1 @@
|
|||
brew install libtiff libjpeg webp little-cms2 openssl
|
||||
brew install libtiff libjpeg webp little-cms2 openssl gettext
|
||||
|
|
|
@ -1 +1 @@
|
|||
gcc-c++ sshpass mariadb-devel openldap-devel
|
||||
gcc-c++ sshpass mariadb-devel openldap-devel gettext
|
||||
|
|
Loading…
Reference in New Issue