Debugged against Velocity container
This commit is contained in:
parent
10729c2702
commit
5d7fe7bc1b
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
.env
|
||||
**/pycache
|
||||
.venv
|
||||
@ -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"]
|
||||
5
build.sh
5
build.sh
@ -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) \
|
||||
.
|
||||
@ -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
|
||||
|
||||
8
push.sh
8
push.sh
@ -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)
|
||||
@ -1,2 +1,3 @@
|
||||
requests
|
||||
fastapi
|
||||
fastapi[standard]
|
||||
Loading…
x
Reference in New Issue
Block a user