forked from SoDOff-Project/sodoff-mmo
add run.sh/bat, simplify/update docker config, ...
- add run.sh and run.bat - change docker config - by default include source in docker image for simple debug (can be disabled via uncoment section in Dockerfile) - add docker-compose.yml - change default time to start first battle event after server start (login first player) to 3 minutes
This commit is contained in:
parent
445d032a74
commit
fa0870784a
@ -1,8 +1,5 @@
|
||||
**/.classpath
|
||||
**/.dockerignore
|
||||
**/.env
|
||||
**/.git
|
||||
**/.gitignore
|
||||
**/.project
|
||||
**/.settings
|
||||
**/.toolstarget
|
||||
@ -14,12 +11,8 @@
|
||||
**/azds.yaml
|
||||
**/bin
|
||||
**/charts
|
||||
**/docker-compose*
|
||||
**/Dockerfile*
|
||||
**/node_modules
|
||||
**/npm-debug.log
|
||||
**/obj
|
||||
**/secrets.dev.yaml
|
||||
**/values.dev.yaml
|
||||
LICENSE
|
||||
README.md
|
21
docker-compose.yml
Normal file
21
docker-compose.yml
Normal file
@ -0,0 +1,21 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
sodoffmmo:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Dockerfile
|
||||
ports:
|
||||
- "9933:9933"
|
||||
networks:
|
||||
- sodoff_network
|
||||
|
||||
networks:
|
||||
sodoff_network:
|
||||
name: sodoff_network
|
||||
# bellow network configuration should be put in at least one file
|
||||
# - but it may be in many or all
|
||||
# - without it it will work like `external: true`
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: "172.16.99.0/24"
|
@ -1,20 +1,18 @@
|
||||
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base
|
||||
WORKDIR /app
|
||||
|
||||
# Use the official .NET SDK image for building the application
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["src/sodoffmmo.csproj", "src/"]
|
||||
RUN dotnet restore "src/sodoffmmo.csproj"
|
||||
|
||||
# Copy the source code
|
||||
COPY . .
|
||||
WORKDIR "/src/src"
|
||||
RUN dotnet build "sodoffmmo.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "sodoffmmo.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||
# Restore dependencies and build the application
|
||||
RUN dotnet build -c Release -o /app
|
||||
|
||||
FROM base AS final
|
||||
# Create clean run environment (without source and sdk)
|
||||
# FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base
|
||||
# WORKDIR /app
|
||||
# COPY --from=build /app .
|
||||
|
||||
# Run the application
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "sodoffmmo.dll"]
|
||||
ENTRYPOINT ["./sodoffmmo"]
|
||||
|
@ -10,7 +10,7 @@
|
||||
"EnableChat": true,
|
||||
|
||||
"// FirstEventTimer": "time to start of first world event (battle ship event) after start MMO server",
|
||||
"FirstEventTimer": 10,
|
||||
"FirstEventTimer": 3,
|
||||
|
||||
"// EventTimer": "time between start of world events (battle ship events)",
|
||||
"EventTimer": 30,
|
||||
|
Loading…
x
Reference in New Issue
Block a user