main
Lìu Văn Quyết 5 months ago
parent 1938a9d733
commit b102d47639
  1. 0
      README.md
  2. 4
      app.py
  3. 6
      data/services.json
  4. 44
      output.log
  5. 2
      servermanagement.pid
  6. 0
      static/script.js
  7. 0
      static/style.css
  8. 1
      templates/index.html
  9. 0
      templates/login.html

@ -64,14 +64,14 @@ def run_shell_command(command_str):
time.sleep(0.1) time.sleep(0.1)
for line in iter(process.stderr.readline, ''): for line in iter(process.stderr.readline, ''):
yield f"data: [ERROR] {line.strip()}\n\n" yield f"data: [] {line.strip()}\n\n"
time.sleep(0.1) time.sleep(0.1)
process.wait() process.wait()
if process.returncode == 0: if process.returncode == 0:
yield f"data: SUCCESS\n\n" yield f"data: SUCCESS\n\n"
else: else:
yield f"data: ERROR\n\n" yield f"data: []\n\n"
def generate_output(command_list): def generate_output(command_list):
"""Chạy command từ JSON, sau đó restart Nginx""" """Chạy command từ JSON, sau đó restart Nginx"""

@ -11,6 +11,12 @@
"description": "Sunday English Exercise", "description": "Sunday English Exercise",
"command": ["cd", "/projects/exercise-se", "&&", "docker", "compose", "down", "&&", "docker", "compose", "up", "-d"] "command": ["cd", "/projects/exercise-se", "&&", "docker", "compose", "down", "&&", "docker", "compose", "up", "-d"]
}, },
{
"name": "Oauth",
"url": "https://oauth2.sundayenglish.com",
"description": "Oauth",
"command": ["cd", "/projects/gk_oauth", "&&", "docker", "compose", "down", "&&", "docker", "compose", "up", "-d"]
},
{ {
"name": "Julius", "name": "Julius",
"url": null, "url": null,

@ -4,30 +4,26 @@ nohup: ignoring input
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0) * Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:5000 * Running on http://127.0.0.1:5000
* Running on http://45.119.213.162:5000 * Running on http://45.119.213.171:5000
Press CTRL+C to quit Press CTRL+C to quit
* Restarting with stat * Restarting with stat
* Debugger is active! * Debugger is active!
* Debugger PIN: 104-926-898 * Debugger PIN: 112-654-638
14.231.189.200 - - [19/Feb/2025 16:01:48] "GET / HTTP/1.1" 200 - 14.231.189.200 - - [19/Feb/2025 17:03:40] "GET / HTTP/1.1" 200 -
14.231.189.200 - - [19/Feb/2025 16:01:48] "GET /static/style.css HTTP/1.1" 304 - 14.231.189.200 - - [19/Feb/2025 17:03:40] "GET /static/style.css HTTP/1.1" 304 -
14.231.189.200 - - [19/Feb/2025 16:01:49] "GET /static/script.js HTTP/1.1" 304 - 14.231.189.200 - - [19/Feb/2025 17:03:41] "GET /static/script.js HTTP/1.1" 304 -
14.231.189.200 - - [19/Feb/2025 16:01:55] "GET /run-command?command[]=cd&command[]=/projects/julius&command[]=%26%26&command[]=docker&command[]=compose&command[]=down&command[]=%26%26&command[]=docker&command[]=compose&command[]=up&command[]=-d HTTP/1.1" 200 - 14.231.189.200 - - [19/Feb/2025 17:03:41] "GET / HTTP/1.1" 200 -
14.231.189.200 - - [19/Feb/2025 16:06:43] "GET / HTTP/1.1" 200 - 14.231.189.200 - - [19/Feb/2025 17:03:41] "GET /static/style.css HTTP/1.1" 304 -
14.231.189.200 - - [19/Feb/2025 16:06:43] "GET /static/style.css HTTP/1.1" 304 - 14.231.189.200 - - [19/Feb/2025 17:03:41] "GET /static/script.js HTTP/1.1" 304 -
14.231.189.200 - - [19/Feb/2025 16:06:43] "GET /static/script.js HTTP/1.1" 304 - 14.231.189.200 - - [19/Feb/2025 17:03:42] "GET / HTTP/1.1" 200 -
14.231.189.200 - - [19/Feb/2025 16:06:43] "GET /favicon.ico HTTP/1.1" 404 - 14.231.189.200 - - [19/Feb/2025 17:03:42] "GET /static/style.css HTTP/1.1" 304 -
14.231.189.200 - - [19/Feb/2025 16:06:47] "GET /run-command?command[]=cd&command[]=/projects/julius&command[]=%26%26&command[]=docker&command[]=compose&command[]=down&command[]=%26%26&command[]=docker&command[]=compose&command[]=up&command[]=-d HTTP/1.1" 200 - 14.231.189.200 - - [19/Feb/2025 17:03:42] "GET / HTTP/1.1" 200 -
14.231.189.200 - - [19/Feb/2025 16:11:08] "GET / HTTP/1.1" 200 - 14.231.189.200 - - [19/Feb/2025 17:03:42] "GET /static/script.js HTTP/1.1" 304 -
14.231.189.200 - - [19/Feb/2025 16:11:08] "GET /static/style.css HTTP/1.1" 304 - 14.231.189.200 - - [19/Feb/2025 17:03:42] "GET /static/style.css HTTP/1.1" 304 -
14.231.189.200 - - [19/Feb/2025 16:11:08] "GET /static/script.js HTTP/1.1" 304 - 14.231.189.200 - - [19/Feb/2025 17:03:42] "GET /static/script.js HTTP/1.1" 200 -
14.231.189.200 - - [19/Feb/2025 16:11:12] "GET /run-command?command[]=cd&command[]=/projects/exercise-se&command[]=%26%26&command[]=docker&command[]=compose&command[]=down&command[]=%26%26&command[]=docker&command[]=compose&command[]=up&command[]=-d HTTP/1.1" 200 - 14.231.189.200 - - [19/Feb/2025 17:03:42] "GET / HTTP/1.1" 200 -
14.231.189.200 - - [19/Feb/2025 16:12:16] "GET /run-command?command[]=cd&command[]=/projects/exercise-se&command[]=%26%26&command[]=docker&command[]=compose&command[]=down&command[]=%26%26&command[]=docker&command[]=compose&command[]=up&command[]=-d HTTP/1.1" 200 - 14.231.189.200 - - [19/Feb/2025 17:03:42] "GET /static/style.css HTTP/1.1" 304 -
14.231.189.200 - - [19/Feb/2025 16:13:11] "GET /run-command?command[]=cd&command[]=/projects/exercise-se&command[]=%26%26&command[]=docker&command[]=compose&command[]=down&command[]=%26%26&command[]=docker&command[]=compose&command[]=up&command[]=-d HTTP/1.1" 200 - 14.231.189.200 - - [19/Feb/2025 17:03:42] "GET /static/script.js HTTP/1.1" 304 -
14.231.189.200 - - [19/Feb/2025 16:13:16] "GET / HTTP/1.1" 200 - 14.231.189.200 - - [19/Feb/2025 17:03:42] "GET / HTTP/1.1" 200 -
14.231.189.200 - - [19/Feb/2025 16:13:16] "GET /static/style.css HTTP/1.1" 304 - 14.231.189.200 - - [19/Feb/2025 17:03:42] "GET /static/style.css HTTP/1.1" 304 -
14.231.189.200 - - [19/Feb/2025 16:13:16] "GET /static/script.js HTTP/1.1" 304 - 14.231.189.200 - - [19/Feb/2025 17:03:42] "GET /static/script.js HTTP/1.1" 304 -
14.231.189.200 - - [19/Feb/2025 16:15:55] "GET / HTTP/1.1" 200 -
14.231.189.200 - - [19/Feb/2025 16:15:55] "GET /static/style.css HTTP/1.1" 304 -
14.231.189.200 - - [19/Feb/2025 16:15:55] "GET /static/script.js HTTP/1.1" 304 -
14.231.189.200 - - [19/Feb/2025 16:16:02] "GET /run-command?command[]=cd&command[]=/projects/service-se&command[]=%26%26&command[]=docker&command[]=compose&command[]=down&command[]=%26%26&command[]=docker&command[]=compose&command[]=up&command[]=-d HTTP/1.1" 200 -

@ -1 +1 @@
1364291 31232

@ -3,6 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<link rel="icon" href="https://gkcorp.com.vn/images/logo.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Service List</title> <title>Service List</title>

Loading…
Cancel
Save