Compare commits
No commits in common. "docker" and "master" have entirely different histories.
4 changed files with 0 additions and 130 deletions
|
|
@ -1,23 +0,0 @@
|
||||||
.git
|
|
||||||
.github
|
|
||||||
docs
|
|
||||||
proto
|
|
||||||
build
|
|
||||||
*.md
|
|
||||||
CREDITS
|
|
||||||
LICENSE
|
|
||||||
|
|
||||||
# Build outputs
|
|
||||||
src/**/bin/
|
|
||||||
src/**/obj/
|
|
||||||
|
|
||||||
# Test projects — not needed for the server image
|
|
||||||
src/MHServerEmu.Core.Tests/
|
|
||||||
src/MHServerEmu.Games.Tests/
|
|
||||||
|
|
||||||
# Tools — separate solution, not part of the server
|
|
||||||
src/Tools/
|
|
||||||
|
|
||||||
# Debug symbols and XML docs
|
|
||||||
**/*.pdb
|
|
||||||
**/*.xml
|
|
||||||
47
.github/workflows/nightly-docker.yml
vendored
47
.github/workflows/nightly-docker.yml
vendored
|
|
@ -1,47 +0,0 @@
|
||||||
name: Nightly Docker Image
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '15 7 * * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
|
||||||
REGISTRY: ghcr.io
|
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-push:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Log in to GitHub Container Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ env.REGISTRY }}
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Extract Docker metadata
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
||||||
tags: |
|
|
||||||
type=schedule,pattern=nightly-{{date 'YYYYMMDD'}}
|
|
||||||
type=raw,value=nightly
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
push: true
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
45
Dockerfile
45
Dockerfile
|
|
@ -1,45 +0,0 @@
|
||||||
# Build stage
|
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
|
||||||
WORKDIR /source
|
|
||||||
|
|
||||||
# Copy dep DLLs and project files first to cache the restore layer
|
|
||||||
COPY dep/ dep/
|
|
||||||
COPY src/Gazillion/Gazillion.csproj src/Gazillion/
|
|
||||||
COPY src/MHServerEmu/MHServerEmu.csproj src/MHServerEmu/
|
|
||||||
COPY src/MHServerEmu.Core/MHServerEmu.Core.csproj src/MHServerEmu.Core/
|
|
||||||
COPY src/MHServerEmu.DatabaseAccess/MHServerEmu.DatabaseAccess.csproj src/MHServerEmu.DatabaseAccess/
|
|
||||||
COPY src/MHServerEmu.Frontend/MHServerEmu.Frontend.csproj src/MHServerEmu.Frontend/
|
|
||||||
COPY src/MHServerEmu.Games/MHServerEmu.Games.csproj src/MHServerEmu.Games/
|
|
||||||
COPY src/MHServerEmu.Grouping/MHServerEmu.Grouping.csproj src/MHServerEmu.Grouping/
|
|
||||||
COPY src/MHServerEmu.Leaderboards/MHServerEmu.Leaderboards.csproj src/MHServerEmu.Leaderboards/
|
|
||||||
COPY src/MHServerEmu.PlayerManagement/MHServerEmu.PlayerManagement.csproj src/MHServerEmu.PlayerManagement/
|
|
||||||
COPY src/MHServerEmu.WebFrontend/MHServerEmu.WebFrontend.csproj src/MHServerEmu.WebFrontend/
|
|
||||||
|
|
||||||
RUN dotnet restore src/MHServerEmu/MHServerEmu.csproj --runtime linux-x64
|
|
||||||
|
|
||||||
# Copy source and publish as self-contained linux-x64
|
|
||||||
COPY src/ src/
|
|
||||||
|
|
||||||
RUN dotnet publish src/MHServerEmu/MHServerEmu.csproj \
|
|
||||||
--no-restore \
|
|
||||||
--configuration Release \
|
|
||||||
--runtime linux-x64 \
|
|
||||||
--self-contained true \
|
|
||||||
--output /build/publish
|
|
||||||
|
|
||||||
# Runtime stage — runtime-deps is sufficient for self-contained binaries
|
|
||||||
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0
|
|
||||||
WORKDIR /build
|
|
||||||
|
|
||||||
COPY --from=build /build/publish /server
|
|
||||||
|
|
||||||
# Data directory holds the SQLite database, Config.ini overrides, and game assets.
|
|
||||||
# Mount a host directory here to persist player data across container restarts.
|
|
||||||
VOLUME ["/server"]
|
|
||||||
|
|
||||||
# 4306 — game client frontend
|
|
||||||
# 8080 — web frontend / dashboard
|
|
||||||
EXPOSE 4306
|
|
||||||
EXPOSE 8080
|
|
||||||
|
|
||||||
ENTRYPOINT ["./MHServerEmu"]
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
services:
|
|
||||||
mhservereemu:
|
|
||||||
image: ghcr.io/crypto137/mhservereemu:nightly
|
|
||||||
container_name: mhservereemu
|
|
||||||
restart: unless-stopped
|
|
||||||
ports:
|
|
||||||
- "4306:4306" # Game client frontend
|
|
||||||
- "8080:8080" # Web frontend / dashboard
|
|
||||||
volumes:
|
|
||||||
# Persists the SQLite database, backups, and any other runtime data.
|
|
||||||
# Place your game asset files (CalligraphyData.sip, etc.) here before first run.
|
|
||||||
- mhservereemu-data:/server
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
mhservereemu-data:
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue