mirror of
https://github.com/SoDOff-Project/sodoff-mmo.git
synced 2025-10-11 08:18:49 -07:00
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
|
**/.classpath
|
||||||
**/.dockerignore
|
|
||||||
**/.env
|
**/.env
|
||||||
**/.git
|
|
||||||
**/.gitignore
|
|
||||||
**/.project
|
**/.project
|
||||||
**/.settings
|
**/.settings
|
||||||
**/.toolstarget
|
**/.toolstarget
|
||||||
@ -14,12 +11,8 @@
|
|||||||
**/azds.yaml
|
**/azds.yaml
|
||||||
**/bin
|
**/bin
|
||||||
**/charts
|
**/charts
|
||||||
**/docker-compose*
|
|
||||||
**/Dockerfile*
|
|
||||||
**/node_modules
|
**/node_modules
|
||||||
**/npm-debug.log
|
**/npm-debug.log
|
||||||
**/obj
|
**/obj
|
||||||
**/secrets.dev.yaml
|
**/secrets.dev.yaml
|
||||||
**/values.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.
|
# Use the official .NET SDK image for building the application
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY ["src/sodoffmmo.csproj", "src/"]
|
|
||||||
RUN dotnet restore "src/sodoffmmo.csproj"
|
# Copy the source code
|
||||||
COPY . .
|
COPY . .
|
||||||
WORKDIR "/src/src"
|
|
||||||
RUN dotnet build "sodoffmmo.csproj" -c Release -o /app/build
|
|
||||||
|
|
||||||
FROM build AS publish
|
# Restore dependencies and build the application
|
||||||
RUN dotnet publish "sodoffmmo.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
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
|
WORKDIR /app
|
||||||
COPY --from=publish /app/publish .
|
ENTRYPOINT ["./sodoffmmo"]
|
||||||
ENTRYPOINT ["dotnet", "sodoffmmo.dll"]
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"EnableChat": true,
|
"EnableChat": true,
|
||||||
|
|
||||||
"// FirstEventTimer": "time to start of first world event (battle ship event) after start MMO server",
|
"// 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": "time between start of world events (battle ship events)",
|
||||||
"EventTimer": 30,
|
"EventTimer": 30,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user