better setup

master
Benjamin Kraft 2 years ago
parent c22c4286e2
commit c078c2a35d
  1. 2
      .idea/misc.xml
  2. 8
      .idea/sshConfigs.xml
  3. 4
      Sharehealth.iml
  4. 69
      poetry.lock
  5. 15
      pyproject.toml
  6. 11
      scripts/deploy.py
  7. 4
      scripts/deploy.sh
  8. 2
      scripts/get_paper.py
  9. 3
      scripts/start_local.py
  10. 4
      scripts/start_local.sh
  11. 3
      scripts/start_remote.py
  12. 3
      scripts/start_remote.sh

@ -5,7 +5,7 @@
<item index="0" class="java.lang.String" itemvalue="org.bukkit.event.EventHandler" /> <item index="0" class="java.lang.String" itemvalue="org.bukkit.event.EventHandler" />
</list> </list>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" project-jdk-name="openjdk-17" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_16" project-jdk-name="openjdk-18" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SshConfigs">
<configs>
<sshConfig authType="OPEN_SSH" host="benjocraeft.com" id="e919d8cd-3833-4b0e-911f-3f811c9d2c87" port="22" nameFormat="DESCRIPTIVE" username="minecraft" useOpenSSHConfig="true" />
</configs>
</component>
</project>

@ -9,7 +9,7 @@
</configuration> </configuration>
</facet> </facet>
<facet type="Python" name="Python"> <facet type="Python" name="Python">
<configuration sdkName="Python 3.9" /> <configuration sdkName="Poetry (Sharehealth)" />
</facet> </facet>
</component> </component>
<component name="NewModuleRootManager" inherit-compiler-output="true"> <component name="NewModuleRootManager" inherit-compiler-output="true">
@ -43,6 +43,6 @@
<SOURCES /> <SOURCES />
</library> </library>
</orderEntry> </orderEntry>
<orderEntry type="library" name="Python 3.9 interpreter library" level="application" /> <orderEntry type="library" name="Poetry (Sharehealth) interpreter library" level="application" />
</component> </component>
</module> </module>

69
poetry.lock generated

@ -0,0 +1,69 @@
[[package]]
name = "certifi"
version = "2022.6.15.1"
description = "Python package for providing Mozilla's CA Bundle."
category = "main"
optional = false
python-versions = ">=3.6"
[[package]]
name = "charset-normalizer"
version = "2.1.1"
description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
category = "main"
optional = false
python-versions = ">=3.6.0"
[package.extras]
unicode_backport = ["unicodedata2"]
[[package]]
name = "idna"
version = "3.3"
description = "Internationalized Domain Names in Applications (IDNA)"
category = "main"
optional = false
python-versions = ">=3.5"
[[package]]
name = "requests"
version = "2.28.1"
description = "Python HTTP for Humans."
category = "main"
optional = false
python-versions = ">=3.7, <4"
[package.dependencies]
certifi = ">=2017.4.17"
charset-normalizer = ">=2,<3"
idna = ">=2.5,<4"
urllib3 = ">=1.21.1,<1.27"
[package.extras]
socks = ["PySocks (>=1.5.6,!=1.5.7)"]
use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"]
[[package]]
name = "urllib3"
version = "1.26.12"
description = "HTTP library with thread-safe connection pooling, file post, and more."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4"
[package.extras]
brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"]
secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "urllib3-secure-extra", "ipaddress"]
socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"]
[metadata]
lock-version = "1.1"
python-versions = "^3.10"
content-hash = "85c733ed2e30b2fa419bcfed233b1bbd86d4dced07ae54f97e4f90d17b1993ad"
[metadata.files]
certifi = []
charset-normalizer = []
idna = []
requests = []
urllib3 = []

@ -0,0 +1,15 @@
[tool.poetry]
name = "sharehealth"
version = "0.1.0"
description = ""
authors = ["Benjamin Kraft <benjamin.kraft@online.de>"]
[tool.poetry.dependencies]
python = "^3.10"
requests = "^2.28.1"
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

@ -1,11 +0,0 @@
import shutil
import subprocess
pluginPath = "out/artifacts/Sharehealth/Sharehealth.jar"
# local server
shutil.copy2(pluginPath, "server/plugins")
# remote server
subprocess.run(["scp", pluginPath, "minecraft@130.61.179.201:/home/minecraft/servers/flattest/plugins"])

@ -0,0 +1,4 @@
#!/usr/bin/bash
cp out/artifacts/Sharehealth/Sharehealth.jar server/plugins
scp out/artifacts/Sharehealth/Sharehealth.jar minecraft@130.61.179.201:/home/minecraft/servers/flattest/plugins

@ -1,3 +1,5 @@
#!/usr/bin/env python3
import requests import requests
import sys import sys

@ -1,3 +0,0 @@
import os
os.system("cd server && java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -jar paper.jar nogui")

@ -0,0 +1,4 @@
#!/usr/bin/bash
cd server &&
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -jar paper.jar nogui

@ -1,3 +0,0 @@
import os
os.system('ssh minecraft@130.61.179.201 "cd servers/flattest; ./start.sh"')

@ -0,0 +1,3 @@
#!/usr/bin/bash
ssh minecraft@130.61.179.201 "cd servers/flattest && ./start.sh"
Loading…
Cancel
Save