Compare commits
No commits in common. "main" and "v1.0.0" have entirely different histories.
33
.github/workflows/docker_dev.yml
vendored
33
.github/workflows/docker_dev.yml
vendored
@ -1,33 +0,0 @@
|
||||
name: Deploy Development Release to DockerHub
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@master
|
||||
with:
|
||||
platforms: all
|
||||
|
||||
- name: Set up Docker Build
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: germannewsmaker/mcdash:development
|
25
.github/workflows/release.yml
vendored
25
.github/workflows/release.yml
vendored
@ -16,14 +16,6 @@ jobs:
|
||||
java-version: '8'
|
||||
distribution: 'adopt'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@master
|
||||
with:
|
||||
platforms: all
|
||||
|
||||
- name: Set up Docker Build
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
@ -50,19 +42,4 @@ jobs:
|
||||
prerelease: false
|
||||
title: Release ${{ steps.get_version.outputs.version }}
|
||||
files: |
|
||||
./target/${{ steps.get_artifact_id.outputs.name }}-${{ steps.get_version.outputs.version }}.jar
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
germannewsmaker/mcdash:latest
|
||||
germannewsmaker/mcdash:${{ steps.get_version.outputs.version }}
|
||||
./target/${{ steps.get_artifact_id.outputs.name }}-${{ steps.get_version.outputs.version }}.jar
|
22
Dockerfile
22
Dockerfile
@ -1,22 +0,0 @@
|
||||
FROM maven:3.8.7-openjdk-18-slim AS build
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y curl && \
|
||||
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
|
||||
apt-get install -y nodejs
|
||||
COPY pom.xml .
|
||||
|
||||
COPY src ./src
|
||||
COPY webui ./webui
|
||||
|
||||
RUN mvn compile assembly:single
|
||||
|
||||
FROM openjdk:18-slim
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=build /app/target/MCDash-Wrapper.jar ./server.jar
|
||||
|
||||
EXPOSE 7865
|
||||
|
||||
CMD ["java", "-jar", "server.jar"]
|
33
README.md
33
README.md
@ -1,33 +1,2 @@
|
||||
<br />
|
||||
<p align="center">
|
||||
<a href="https://git.gnm.dev/Mathias/MCDashWrapper/">
|
||||
<picture>
|
||||
<img alt="MCDash Banner" src="https://i.imgur.com/bxuP8yC.png">
|
||||
</picture>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
## About The Project
|
||||
# MCDashWrapper
|
||||
MCDash Wrapper combines the power of MCDash with a wrapper to create servers easier
|
||||
|
||||
## Features
|
||||
- [x] Automatically manages Java versions and server files
|
||||
- [x] Support for Spigot, Paper, and Purpur
|
||||
- [x] Easy to use web interface
|
||||
|
||||
## Screenshots
|
||||
|
||||
### Overview
|
||||

|
||||
|
||||
### Panel [[More here]](https://github.com/gnmyt/MCDash)
|
||||

|
||||
|
||||
### Server Creation
|
||||

|
||||
|
||||
## Installation
|
||||
Check out our [installation guide](https://mcdash.gnmyt.dev/docs/wrapper) to install MCDash Wrapper on your server.
|
||||
|
||||
## License
|
||||
Distributed under the MIT License. See `LICENSE` for more information.
|
||||
|
@ -1,3 +0,0 @@
|
||||
files:
|
||||
- source: /webui/public/assets/locales/en.json
|
||||
translation: /webui/public/assets/locales/%two_letters_code%.json
|
104
install.sh
104
install.sh
@ -1,104 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
NC='\033[0m'
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
export JAVA_VERSION="11"
|
||||
export SERVER_ROOT="/opt/mcdash"
|
||||
export JAVA_ROOT="${SERVER_ROOT}/java"
|
||||
|
||||
function error() {
|
||||
echo -e "${RED}Error: $1${NC}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
function download() {
|
||||
wget -q --show-progress -O "$2" "$1"
|
||||
}
|
||||
|
||||
echo -e "${GREEN}Checking for root${NC}"
|
||||
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
error "Please run as root"
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}Installing dependencies${NC}"
|
||||
|
||||
apt-get update
|
||||
apt-get install -y wget curl tar || error "Failed to install dependencies"
|
||||
|
||||
for cmd in wget curl tar; do
|
||||
if ! command -v $cmd &> /dev/null; then
|
||||
error "Unable to install $cmd"
|
||||
fi
|
||||
done
|
||||
|
||||
echo -e "${GREEN}Installing Java${NC}"
|
||||
|
||||
mkdir -p "${JAVA_ROOT}" || error "Unable to create java directory"
|
||||
cd "${JAVA_ROOT}" || error "Unable to change directory"
|
||||
|
||||
ARCH=$(uname -m)
|
||||
if [ "${ARCH}" == "x86_64" ]; then
|
||||
ARCH="x64"
|
||||
else
|
||||
ARCH="x32"
|
||||
fi
|
||||
|
||||
download "https://api.adoptium.net/v3/binary/latest/${JAVA_VERSION}/ga/linux/${ARCH}/jre/hotspot/normal/adoptium" "java.tar.gz"
|
||||
|
||||
if [ ! -f "java.tar.gz" ]; then
|
||||
error "Unable to download Java"
|
||||
fi
|
||||
|
||||
tar -xzf java.tar.gz
|
||||
rm java.tar.gz
|
||||
|
||||
mv jdk*/* .
|
||||
rm -r jdk*
|
||||
|
||||
if [ ! -f "bin/java" ]; then
|
||||
error "Unable to find java"
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}Installing wrapper${NC}"
|
||||
|
||||
mkdir -p "${SERVER_ROOT}" || error "Unable to create server directory"
|
||||
|
||||
wget -q --show-progress -O "${SERVER_ROOT}/server.jar" $(curl -s https://api.github.com/repos/gnmyt/MCDashWrapper/releases/latest | grep "browser_download_url.*\.jar" | cut -d : -f 2,3 | tr -d \")
|
||||
|
||||
if [ ! -f "${SERVER_ROOT}/server.jar" ]; then
|
||||
error "Unable to download server"
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}Creating user${NC}"
|
||||
|
||||
useradd -r -m -d "${SERVER_ROOT}" -s /bin/bash mcdash
|
||||
chown -R mcdash:mcdash "${SERVER_ROOT}"
|
||||
|
||||
echo -e "${GREEN}Creating service${NC}"
|
||||
|
||||
cat > /etc/systemd/system/mcdash.service <<EOF
|
||||
[Unit]
|
||||
Description=MCDash Wrapper
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=mcdash
|
||||
WorkingDirectory=${SERVER_ROOT}
|
||||
ExecStart=${JAVA_ROOT}/bin/java -jar ${SERVER_ROOT}/server.jar
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
echo -e "${GREEN}Starting service${NC}"
|
||||
|
||||
systemctl enable mcdash
|
||||
systemctl start mcdash
|
||||
|
||||
echo -e "${GREEN}Installation complete${NC}"
|
12
pom.xml
12
pom.xml
@ -30,7 +30,7 @@
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>3.5.0</version>
|
||||
<version>3.1.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>npm install</id>
|
||||
@ -97,35 +97,35 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>2.24.1</version>
|
||||
<version>2.20.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Logging Core -->
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.24.1</version>
|
||||
<version>2.20.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Logging SLF4J Implementation -->
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-slf4j-impl</artifactId>
|
||||
<version>2.24.1</version>
|
||||
<version>2.20.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Gson API (Decode/Encode JSON) -->
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.11.0</version>
|
||||
<version>2.10.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Commons IO (Useful IO Utilities) -->
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.17.0</version>
|
||||
<version>2.15.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Reflections API -->
|
||||
|
2871
webui/package-lock.json
generated
2871
webui/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -10,27 +10,27 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.13.3",
|
||||
"@emotion/styled": "^11.13.0",
|
||||
"@fontsource/inter": "^5.1.0",
|
||||
"@mui/icons-material": "^5.16.7",
|
||||
"@mui/material": "^5.16.7",
|
||||
"i18next": "^23.16.2",
|
||||
"i18next-browser-languagedetector": "^8.0.0",
|
||||
"i18next-http-backend": "^2.6.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-i18next": "^15.1.0",
|
||||
"react-router-dom": "^6.27.0"
|
||||
"@emotion/react": "^11.11.3",
|
||||
"@emotion/styled": "^11.11.0",
|
||||
"@fontsource/inter": "^5.0.16",
|
||||
"@mui/icons-material": "^5.15.10",
|
||||
"@mui/material": "^5.15.10",
|
||||
"i18next": "^23.8.2",
|
||||
"i18next-browser-languagedetector": "^7.2.0",
|
||||
"i18next-http-backend": "^2.4.3",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-i18next": "^14.0.5",
|
||||
"react-router-dom": "^6.22.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.3.12",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"@vitejs/plugin-react": "^4.3.3",
|
||||
"eslint": "^9.13.0",
|
||||
"eslint-plugin-react": "^7.37.2",
|
||||
"eslint-plugin-react-hooks": "^5.0.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.13",
|
||||
"vite": "^5.4.10"
|
||||
"@types/react": "^18.2.55",
|
||||
"@types/react-dom": "^18.2.19",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-plugin-react": "^7.33.2",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.5",
|
||||
"vite": "^5.1.0"
|
||||
}
|
||||
}
|
||||
|
2020
webui/yarn.lock
2020
webui/yarn.lock
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user