Debugged against Velocity container

This commit is contained in:
Jim Shepich III 2025-02-18 10:44:46 -05:00
parent 10729c2702
commit 5d7fe7bc1b
7 changed files with 21 additions and 3 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
.env
**/pycache
.venv

View File

@ -1 +1 @@
0.0.1-dev1
0.0.1-dev2

View File

@ -14,4 +14,4 @@ RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 8000
# Serve the API
CMD ['fastapi', 'run', '--port', '8000', '/app/minecraft-plugin-proxy.py']
CMD ["fastapi", "run", "--port", "8000", "/app/minecraft-plugin-proxy.py"]

View File

@ -1,3 +1,6 @@
#!/bin/sh
podman build -t minecraft-plugin-proxy:latest -t minecraft-plugin-proxy:$(cat ./.version) .
podman build \
-t ghcr.io/epicshepich/minecraft-plugin-proxy:latest \
-t ghcr.io/epicshepich/minecraft-plugin-proxy:$(cat ./.version) \
.

View File

@ -11,6 +11,7 @@ from xml.etree import ElementTree as ET
api = FastAPI()
@api.get('/viabackwards/velocity')
@api.head('/viabackwards/velocity')
async def viabackwards_velocity():
latest_release = requests.get(
@ -21,6 +22,7 @@ async def viabackwards_velocity():
)
@api.get('/luckperms/{server_type}')
@api.head('/luckperms/{server_type}')
async def luckperms_velocity(server_type):
luckperms_metadata = requests.get('https://metadata.luckperms.net/data/all').json()
@ -31,6 +33,7 @@ async def luckperms_velocity(server_type):
@api.get('/tribufu-velocityrcon')
@api.head('/tribufu-velocityrcon')
async def tribufu_velocityrcon():
velocityrcon_metadata = requests.get('https://mvn.tribufu.com/releases/com/tribufu/Tribufu-VelocityRcon/maven-metadata.xml').text

View File

@ -0,0 +1,8 @@
#!/bin/sh
. ./.env
echo $GHCR_TOKEN | podman login ghcr.io -u USERNAME --password-stdin
podman push ghcr.io/epicshepich/minecraft-plugin-proxy:latest
podman push ghcr.io/epicshepich/minecraft-plugin-proxy:$(cat ./.version)

View File

@ -1,2 +1,3 @@
requests
fastapi
fastapi[standard]