This commit is contained in:
Bob 2019-09-05 17:21:59 +08:00
parent a23ca9f54a
commit 7d755fd482
4 changed files with 85 additions and 48 deletions

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -1,7 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="9cbc7ee8-e518-44ca-870c-9743cf0f1b98" name="Default Changelist" comment="" /> <list default="true" id="9cbc7ee8-e518-44ca-870c-9743cf0f1b98" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/fabfile.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/linbei/wsgi.py" beforeDir="false" afterPath="$PROJECT_DIR$/linbei/wsgi.py" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -41,7 +46,7 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/dashboard/static/dashboard/js/index.js"> <entry file="file://$PROJECT_DIR$/dashboard/static/dashboard/js/index.js">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="352"> <state relative-caret-position="352">
@ -50,6 +55,27 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/fabfile.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="132">
<caret line="6" column="55" selection-start-line="6" selection-start-column="55" selection-end-line="6" selection-end-column="55" />
<folding>
<element signature="e#0#29#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/linbei/wsgi.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="18" lean-forward="true" selection-start-line="18" selection-end-line="18" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/linbei/urls.py"> <entry file="file://$PROJECT_DIR$/linbei/urls.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
@ -84,6 +110,9 @@
</list> </list>
</option> </option>
</component> </component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory"> <component name="IdeDocumentHistory">
<option name="CHANGED_PATHS"> <option name="CHANGED_PATHS">
<list> <list>
@ -100,6 +129,8 @@
<option value="$PROJECT_DIR$/dashboard/templates/dashboard/common/base.html" /> <option value="$PROJECT_DIR$/dashboard/templates/dashboard/common/base.html" />
<option value="$PROJECT_DIR$/dashboard/templates/dashboard/index.html" /> <option value="$PROJECT_DIR$/dashboard/templates/dashboard/index.html" />
<option value="$PROJECT_DIR$/dashboard/static/dashboard/js/index.js" /> <option value="$PROJECT_DIR$/dashboard/static/dashboard/js/index.js" />
<option value="$PROJECT_DIR$/fabfile.py" />
<option value="$PROJECT_DIR$/linbei/wsgi.py" />
</list> </list>
</option> </option>
</component> </component>
@ -109,6 +140,7 @@
<option name="width" value="1936" /> <option name="width" value="1936" />
<option name="height" value="1056" /> <option name="height" value="1056" />
</component> </component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView"> <component name="ProjectView">
<navigator proportions="" version="1"> <navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" /> <foldersAlwaysOnTop value="true" />
@ -122,45 +154,6 @@
<item name="linbei" type="b2602c69:ProjectViewProjectNode" /> <item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" /> <item name="linbei" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
<item name="static" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
<item name="static" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
<item name="static" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
<item name="js" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
<item name="templates" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
<item name="templates" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
</path>
<path> <path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" /> <item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" /> <item name="linbei" type="462c0819:PsiDirectoryNode" />
@ -239,25 +232,33 @@
<option name="number" value="Default" /> <option name="number" value="Default" />
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1567669372596</updated> <updated>1567669372596</updated>
<workItem from="1567669377954" duration="5074000" /> <workItem from="1567669377954" duration="5885000" />
</task> </task>
<task id="LOCAL-00001" summary="#creat">
<created>1567674653918</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1567674653918</updated>
</task>
<option name="localTasksCounter" value="2" />
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="5074000" /> <option name="totallyTimeSpent" value="5885000" />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" /> <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
<editor active="true" /> <editor active="true" />
<layout> <layout>
<window_info id="Favorites" side_tool="true" /> <window_info id="Favorites" side_tool="true" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.24973376" /> <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24973376" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" /> <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Docker" show_stripe_button="false" /> <window_info anchor="bottom" id="Docker" show_stripe_button="false" />
<window_info anchor="bottom" id="Database Changes" /> <window_info anchor="bottom" id="Database Changes" />
<window_info anchor="bottom" id="Version Control" /> <window_info anchor="bottom" id="Version Control" />
<window_info anchor="bottom" id="Python Console" /> <window_info anchor="bottom" id="Python Console" />
<window_info active="true" anchor="bottom" id="Terminal" visible="true" weight="0.32937366" /> <window_info anchor="bottom" id="Terminal" visible="true" weight="0.32937366" />
<window_info anchor="bottom" id="Event Log" side_tool="true" /> <window_info anchor="bottom" id="Event Log" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" /> <window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" /> <window_info anchor="bottom" id="Find" order="1" />
@ -276,10 +277,11 @@
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" /> <option name="version" value="1" />
</component> </component>
<component name="VcsManagerConfiguration">
<MESSAGE value="#creat" />
<option name="LAST_COMMIT_MESSAGE" value="#creat" />
</component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/linbei/wsgi.py">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/dashboard/static/dashboard/css/legend.css"> <entry file="file://$PROJECT_DIR$/dashboard/static/dashboard/css/legend.css">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154"> <state relative-caret-position="154">
@ -416,5 +418,22 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/fabfile.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="132">
<caret line="6" column="55" selection-start-line="6" selection-start-column="55" selection-end-line="6" selection-end-column="55" />
<folding>
<element signature="e#0#29#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/linbei/wsgi.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="18" lean-forward="true" selection-start-line="18" selection-end-line="18" />
</state>
</provider>
</entry>
</component> </component>
</project> </project>

10
fabfile.py vendored Normal file
View File

@ -0,0 +1,10 @@
from fabistrano import deploy
from fabric.api import env
env.hosts = ["g214@210.77.68.250"] # Replace with your host name or IP
env.base_dir = '/var/www/p3' # Set to your app's directory
env.app_name = 'linbei' # This will deploy the app to /www/app_name.com/
env.git_clone = 'http://git.eanbo.cn/xieshen/linbei.git' # Your git url
env.remote_owner = 'g214'
env.remote_group = 'www-data'
env.restart_cmd = 'sudo service apache2 restart'

View File

@ -8,8 +8,10 @@ https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
""" """
import os import os
import sys
from django.core.wsgi import get_wsgi_application from django.core.wsgi import get_wsgi_application
sys.path.append("/var/www/p3/linbei/current")
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'linbei.settings') os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'linbei.settings')