#更换服务器

This commit is contained in:
xieshen 2020-12-08 21:27:35 +08:00
parent 0d515f46c0
commit ec7044c3b3
3 changed files with 12 additions and 12 deletions

View File

@ -153,9 +153,9 @@ STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
]
STATIC_ROOT = '/var/www/p3/static/'
STATIC_ROOT = '/var/www/p3/newmediamonitoring/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = '/var/www/p3/media/'
MEDIA_ROOT = '/var/www/p3/newmediamonitoring/media/'
"""用户模块扩展部分"""
AUTH_PROFILE_MODULE = 'djangoadmin.myadmin.UserProfile'
"""用户模块扩展完成"""

View File

@ -16,6 +16,6 @@ import traceback
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'NewMediaMonitoring.settings')
# sys.path.append("/var/www/p3/newmediamonitoring/current")
sys.path.append("/var/www/p3/newmediamonitoring")
sys.path.append("/var/www/p3/newmediamonitoring/current")
# sys.path.append("/var/www/p3/newmediamonitoring")
application = get_wsgi_application()

16
fabfile.py vendored
View File

@ -1,15 +1,15 @@
from fabistrano import deploy
from fabric.api import env
# env.hosts = ["nut@210.72.82.249"] # Replace with your host name or IP
env.hosts = ["root@182.92.56.18"] # Replace with your host name or IP
env.hosts = ["nut@210.72.82.249"] # Replace with your host name or IP
# env.hosts = ["root@182.92.56.18"] # Replace with your host name or IP
# env.base_dir = '/var/www/p3' # Set to your app's directory
env.base_dir = '/var/www/p3' # Set to your app's directory
env.app_name = 'newmediamonitoring' # This will deploy the app to /www/app_name.com/
env.git_clone = 'http://210.77.77.77/xieshen/newmediamonitoring.git' # Your git url
# env.remote_owner = 'nut'
env.remote_owner = 'root'
# env.remote_group = 'www-data'
env.remote_group = 'root'
# env.restart_cmd = 'sudo service apache2 restart'
env.restart_cmd = 'systemctl restart httpd.service'
env.remote_owner = 'nut'
# env.remote_owner = 'root'
env.remote_group = 'www-data'
# env.remote_group = 'root'
env.restart_cmd = 'sudo service apache2 restart'
# env.restart_cmd = 'systemctl restart httpd.service'