Skip to content

Commit b693598

Browse files
committed
Update the website
1 parent 75c7e74 commit b693598

33 files changed

Lines changed: 2944 additions & 28670 deletions

.dockerignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules
2+
dist
3+
.git
4+
.github
5+
*.md
6+
.gitignore
7+
.dockerignore
8+
Dockerfile
9+
npm-debug.log*
10+
.DS_Store
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build and Publish Docker Image
2+
3+
on:
4+
push:
5+
branches: [master]
6+
workflow_dispatch:
7+
8+
env:
9+
REGISTRY: ghcr.io
10+
IMAGE_NAME: ${{ github.repository }}
11+
12+
jobs:
13+
build-and-push:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Docker Buildx
24+
uses: docker/setup-buildx-action@v3
25+
26+
- name: Log in to GitHub Container Registry
27+
uses: docker/login-action@v3
28+
with:
29+
registry: ${{ env.REGISTRY }}
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Extract metadata
34+
id: meta
35+
uses: docker/metadata-action@v5
36+
with:
37+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
38+
tags: |
39+
type=raw,value=latest,enable={{is_default_branch}}
40+
type=ref,event=tag
41+
type=sha,format=short
42+
43+
- name: Build and push
44+
uses: docker/build-push-action@v6
45+
with:
46+
context: .
47+
push: true
48+
tags: ${{ steps.meta.outputs.tags }}
49+
labels: ${{ steps.meta.outputs.labels }}
50+
cache-from: type=gha
51+
cache-to: type=gha,mode=max

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
# production
1212
/build
13+
/dist
1314

1415
# misc
1516
.DS_Store

Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# syntax=docker/dockerfile:1
2+
3+
# --- Stage 1: build the static site ---
4+
FROM node:20-alpine AS build
5+
WORKDIR /app
6+
7+
# Install dependencies first for better layer caching
8+
COPY package.json package-lock.json* ./
9+
RUN npm ci
10+
11+
# Build
12+
COPY . .
13+
RUN npm run build
14+
15+
# --- Stage 2: serve with nginx ---
16+
FROM nginx:alpine AS runtime
17+
18+
# SPA-friendly nginx config (gzip, asset caching, history fallback)
19+
COPY nginx.conf /etc/nginx/conf.d/default.conf
20+
21+
# Static bundle
22+
COPY --from=build /app/dist /usr/share/nginx/html
23+
24+
EXPOSE 80
25+
CMD ["nginx", "-g", "daemon off;"]

index.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8"/>
5+
<link rel="icon" href="/favicon.ico"/>
6+
<meta name="viewport" content="width=device-width, initial-scale=1"/>
7+
<meta name="keywords"
8+
content="Waterdog, WaterdogPE, Minecraft, Bedrock, Bedrock Edition, Proxy, Java, Plugins, Documentation, BungeeCord, Bedrock Edition BungeeCord"/>
9+
<meta name="theme-color" content="#0f172a"/>
10+
<meta name="description"
11+
content="WaterdogPE is a fast, customizable proxy software for Minecraft: Bedrock Edition written in Java"/>
12+
<meta name="og:description"
13+
content="WaterdogPE is a fast, customizable proxy software for Minecraft: Bedrock Edition written in Java"/>
14+
<meta property="og:title" content="Welcome to WaterdogPE!"/>
15+
<meta property="og:type" content="website"/>
16+
<meta property="og:image" content="https://github.com/WaterdogPE/Branding/raw/master/logo/WaterdogV2.png"/>
17+
<link rel="apple-touch-icon" href="/img/WDLogo.png"/>
18+
<link rel="manifest" href="/manifest.json"/>
19+
<title>WaterdogPE — Minecraft Bedrock Proxy</title>
20+
</head>
21+
<body>
22+
<noscript>You need to enable JavaScript to run this app.</noscript>
23+
<div id="app"></div>
24+
<script type="module" src="/src/main.js"></script>
25+
</body>
26+
</html>

nginx.conf

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
server {
2+
listen 80;
3+
server_name _;
4+
root /usr/share/nginx/html;
5+
index index.html;
6+
7+
# Compress text-based assets
8+
gzip on;
9+
gzip_vary on;
10+
gzip_comp_level 6;
11+
gzip_min_length 1024;
12+
gzip_types
13+
text/plain
14+
text/css
15+
application/javascript
16+
application/json
17+
image/svg+xml
18+
application/manifest+json;
19+
20+
# Long-cache fingerprinted build assets
21+
location /assets/ {
22+
expires 1y;
23+
add_header Cache-Control "public, immutable";
24+
try_files $uri =404;
25+
}
26+
27+
# SPA history fallback
28+
location / {
29+
try_files $uri $uri/ /index.html;
30+
}
31+
}

0 commit comments

Comments
 (0)