我想git提交一个.sh文件,但是当我在另一台服务器上检出同一个文件时,希望它是可执行的.
有没有办法这样做没有手动chmod u + x文件在签出文件的服务器?
如何在AWS弹性beanstalk中管理应用程序日志?我是说你把应用程序日志写到哪个文件?我在我的开发环境中使用以下日志记录配置,但是当我在AWS中部署时,这不起作用.
提前致谢!
DEBUG_LOG_DIR = BASE_DIR + "/django_debug.log"
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
# How to format the output
'formatters': {
'standard': {
'format' : "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s",
'datefmt' : "%d/%b/%Y %H:%M:%S"
},
},
# Log handlers (where to go)
'handlers': {
'null': {
'level':'DEBUG',
'class':'django.utils.log.NullHandler',
},
'log_file': {
'level':'DEBUG',
'class':'logging.handlers.RotatingFileHandler',
'filename': DEBUG_LOG_DIR,
'maxBytes': 50000,
'backupCount': 2,
'formatter': 'standard',
},
'console':{
'level':'INFO',
'class':'logging.StreamHandler',
'formatter': 'standard'
},
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler',
},
},
# Loggers (where does …Run Code Online (Sandbox Code Playgroud) 问题
我正在尝试使用小型数据库后端在 Elastic Beanstalk 上部署一个非常简单的应用程序。我尝试将安装mysqlclient作为 AWS此处概述的过程的一部分。但是,当我部署我的应用程序时,我从我的 Elastic Beanstalk 日志中收到以下错误,因为它尝试下载包:
Collecting mysqlclient
Using cached mysqlclient-2.0.1.tar.gz (87 kB)
2020/08/21 20:30:16.419082 [ERROR] An error occurred during execution of command [app-deploy] - [InstallDependency]. Stop running the command. Error: fail to install dependencies with requirements.txt file with error Command /bin/sh -c /var/app/venv/staging-LQM1lest/bin/pip install -r requirements.txt failed with error exit status 1. Stderr: ERROR: Command errored out with exit status 1:
command: /var/app/venv/staging-LQM1lest/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bz45889a/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bz45889a/mysqlclient/setup.py'"'"';f=getattr(tokenize, …Run Code Online (Sandbox Code Playgroud)