commit 43c17c2c87f6e0b38e2fe0378685da8804b8b42d Author: peri4 Date: Sun Sep 8 13:44:56 2024 +0300 initial, works diff --git a/data/conan_exiles/ConanSandbox/Saved/Config/WindowsServer/Engine.ini b/data/conan_exiles/ConanSandbox/Saved/Config/WindowsServer/Engine.ini new file mode 100644 index 0000000..e4b6aa7 --- /dev/null +++ b/data/conan_exiles/ConanSandbox/Saved/Config/WindowsServer/Engine.ini @@ -0,0 +1,21 @@ +[URL] +Port=7777 ;The Port for your Server + +[OnlineSubsystemSteam] +ServerQueryPort=27015 ;The Port the SteamAPI will query your Server from + +[Core.System] +Paths=../../../Engine/Content +Paths=%GAMEDIR%Content +Paths=../../../Engine/Plugins/2D/Paper2D/Content +Paths=../../../Engine/Plugins/Runtime/HoudiniEngine/Content +Paths=../../../ConanSandbox/Plugins/DialoguePlugin/Content +Paths=../../../ConanSandbox/Plugins/FuncomLiveServices/Content + +[OnlineSubsystem] +bUseBuildIdOverride=True +BuildIdOverride=913162930 +ServerPassword=pass +ServerName=SHS Conan + + diff --git a/data/conan_exiles/ConanSandbox/Saved/Config/WindowsServer/Game.ini b/data/conan_exiles/ConanSandbox/Saved/Config/WindowsServer/Game.ini new file mode 100644 index 0000000..f489c50 --- /dev/null +++ b/data/conan_exiles/ConanSandbox/Saved/Config/WindowsServer/Game.ini @@ -0,0 +1,14 @@ +[Settings.Gameplay] +showContextualControls=True +SendNewItemsToShortcutsWheel=True + +[ConfigManifest] +UpgradedVersions=3 + +[RconPlugin] +RconEnabled=1 ; 1 to turn on, 0 to turn off, or just don't add any of this to the file +RconPassword=adminrcon +RconPort=25575 ; Default port is 25575, you can skip adding it if that's fine with you. In all cases, if you use the default value, it will automatically be removed when the server shuts down. +RconMaxKarma=60 ; Default max karma is 60. This is a protection against brute force attacks or spam. You can skip adding this one + + diff --git a/data/conan_exiles/ConanSandbox/Saved/Config/WindowsServer/ServerSettings.ini b/data/conan_exiles/ConanSandbox/Saved/Config/WindowsServer/ServerSettings.ini new file mode 100644 index 0000000..a5c5ad4 --- /dev/null +++ b/data/conan_exiles/ConanSandbox/Saved/Config/WindowsServer/ServerSettings.ini @@ -0,0 +1,219 @@ +[ServerSettings] +AdminPassword=admin +DropEquipmentOnDeath=0 +NightTimeSpeedScale=3.000000 +DawnDuskSpeedScale=1.500000 +DayTimeSpeedScale=0.800000 +NPCMindReadingMode=0 +MaxNudity=2 +ServerCommunity=0 +ConfigVersion=12 +BlueprintConfigVersion=25 +BuildingPVPWhitelist=("80901","80111","80112","80915","80912") +PlayerKnockbackMultiplier=1.000000 +NPCKnockbackMultiplier=1.000000 +StructureDamageMultiplier=1.000000 +StructureHealthMultiplier=1.000000 +NPCRespawnMultiplier=1.000000 +NPCHealthMultiplier=1.000000 +PlayerDamageMultiplier=1.000000 +PlayerDamageTakenMultiplier=1.000000 +MinionDamageMultiplier=1.000000 +MinionDamageTakenMultiplier=1.000000 +NPCDamageMultiplier=1.000000 +NPCDamageTakenMultiplier=1.000000 +PlayerEncumbranceMultiplier=1.000000 +PlayerEncumbrancePenaltyMultiplier=1.000000 +PlayerMovementSpeedScale=1.000000 +PlayerStaminaCostSprintMultiplier=1.000000 +PlayerSprintSpeedScale=1.000000 +PlayerStaminaCostMultiplier=1.000000 +PlayerHealthRegenSpeedScale=1.000000 +PlayerXPRateMultiplier=1.000000 +PlayerXPKillMultiplier=1.000000 +PlayerXPHarvestMultiplier=1.000000 +PlayerXPCraftMultiplier=1.000000 +PlayerXPTimeMultiplier=1.000000 +DogsOfTheDesertSpawnWithDogs=False +CrossDesertOnce=True +ThrallExclusionRadius=100.000000 +MaxAggroRange=9000.000000 +FriendlyFireDamageMultiplier=0.200000 +CampsIgnoreLandclaim=True +AvatarDomeDurationMultiplier=1.000000 +AvatarDomeDamageMultiplier=1.000000 +NPCMaxSpawnCapMultiplier=1.000000 +PvPMountEnduranceDamageMultiplier=1.000000 +serverRegion=0 +PVPEnabled=False +RestrictPVPTime=False +RestrictPVPBuildingDamageTime=False +PVPTimeMondayStart=0 +PVPTimeTuesdayStart=0 +PVPTimeWednesdayStart=0 +PVPTimeThursdayStart=0 +PVPTimeFridayStart=0 +PVPTimeSaturdayStart=0 +PVPTimeSundayStart=0 +PVPTimeMondayEnd=0 +PVPTimeTuesdayEnd=0 +PVPTimeWednesdayEnd=0 +PVPTimeThursdayEnd=0 +PVPTimeFridayEnd=0 +PVPTimeSaturdayEnd=0 +PVPTimeSundayEnd=0 +PVPEnabledMonday=False +PVPEnabledTuesday=False +PVPEnabledWednesday=False +PVPEnabledThursday=False +PVPEnabledFriday=False +PVPEnabledSaturday=False +PVPEnabledSunday=False +PVPBuildingDamageTimeMondayStart=0 +PVPBuildingDamageTimeTuesdayStart=0 +PVPBuildingDamageTimeWednesdayStart=0 +PVPBuildingDamageTimeThursdayStart=0 +PVPBuildingDamageTimeFridayStart=0 +PVPBuildingDamageTimeSaturdayStart=0 +PVPBuildingDamageTimeSundayStart=0 +PVPBuildingDamageTimeMondayEnd=0 +PVPBuildingDamageTimeTuesdayEnd=0 +PVPBuildingDamageTimeWednesdayEnd=0 +PVPBuildingDamageTimeThursdayEnd=0 +PVPBuildingDamageTimeFridayEnd=0 +PVPBuildingDamageTimeSaturdayEnd=0 +PVPBuildingDamageTimeSundayEnd=0 +PVPBuildingDamageEnabledMonday=False +PVPBuildingDamageEnabledTuesday=False +PVPBuildingDamageEnabledWednesday=False +PVPBuildingDamageEnabledThursday=False +PVPBuildingDamageEnabledFriday=False +PVPBuildingDamageEnabledSaturday=False +PVPBuildingDamageEnabledSunday=False +DisableBuildingDuringTimeRestrictedPVP=False +CombatModeModifier=0 +ContainersIgnoreOwnership=True +LandClaimRadiusMultiplier=1.000000 +DisableLandclaimNotifications=True +BuildingPreloadRadius=80.000000 +CanDamagePlayerOwnedStructures=False +DynamicBuildingDamage=False +DynamicBuildingDamagePeriod=1800 +CreativeModeServer=0 +ServerPassword= +ServerMessageOfTheDay= +KickAFKPercentage=80 +KickAFKTime=2700 +OfflinePlayersUnconsciousBodiesHours=168 +ShowOnlinePlayers=0 +CorpsesPerPlayer=10 +PlayerCorpseLifeTime=1800.000000 +NPCCorpseLifeTime=600.000000 +ItemRepairMinimumDurability=0.100000 +ItemRepairDurabilityLossByRepairkitTier=(0.200000,0.200000,0.150000,0.100000,0.050000,0.025000) +ItemRepairDurabilityLossPenaltyChance=1.000000 +ItemConvertionMultiplier=1.000000 +ThrallConversionMultiplier=1.000000 +FuelBurnTimeMultiplier=1.000000 +CraftingCostMultiplier=1.000000 +StaminaRegenerationTime=1.750000 +StaminaExhaustionTime=3.750000 +StaminaStaticRegenRateMultiplier=1.000000 +StaminaMovingRegenRateMultiplier=1.000000 +PlayerStaminaRegenSpeedScale=1.000000 +StaminaOnConsumeRegenPause=1.000000 +StaminaOnExhaustionRegenPause=1.000000 +ThrallScoutingTimeMinutes=10.000000 +ThrallMinDistanceAwayFromHome=5000.000000 +ThrallTeleportingCooldown=10.000000 +MinionPopulationBaseValue=50 +MinionPopulationPerPlayer=5 +MinionOverpopulationCleanup=60 +MinionOverpopulationAllowed=10 +EnableFollowerDbno=True +UseMinionPopulationLimit=False +EnableFollowerRescueOnLandClaimOnly=True +EnableFollowerRescueInBuildExclusionZone=False +FollowerRescueCooldown=3600 +DamageCooldownBeforeRescue=600 +ThrallCorruptionRemovalMultiplier=1.000000 +PlayerCorruptionGainMultiplier=1.000000 +PlayerCorruptionGainFromSorceryMultiplier=1.000000 +AnimalPenCraftingTimeMultiplier=1.000000 +FeedBoxRangeMultiplier=1.000000 +BuildingDamageMultiplier=1.000000 +PathFollowingSendsAngularVelocity=False +UnconsciousTimeSeconds=1800.000000 +ConciousnessDamageMultiplier=1.000000 +ThrallDamageToPlayersMultiplier=0.500000 +ThrallDamageToNPCsMultiplier=0.500000 +DisableBuildingAbandonment=True +MaxBuildingDecayTime=1296000.000000 +MaxDecayTimeToAutoDemolish=604800.000000 +ThrallDecayTime=1296000.000000 +DisableThrallDecay=True +BuildingDecayTimePerScore=5400.000000 +BuildingDecayTimeMultiplier=1.000000 +DecayCleanupTimeMultiplier=2.000000 +DecayBonusTimeRate=600.000000 +DecayShowBuildingScore=False +EnableTargetLock=True +EnableFatalities=True +CachedLandClaimRadiusMultiplier=1.000000 +ValidatePhysNavWalkWithRaycast=True +LocalNavMeshVisualizationFrequency=-1.000000 +LocalLandClaimVisualizationFrequency=-1.000000 +LocalLandClaimVisualizationRadius=3000 +LocalLandClaimVisualizationChannel=0 +UseLocalQuadraticAngularVelocityPrediction=False +LQAVPUseTime=0.150000 +LQAVPFadeTime=0.100000 +LQAVPMethod=2 +NetworkSimulatedSmoothRotationTimeWithLQAVP=0.100000 +EnableClanMarkers=True +ValidatePlayerStats=False +AllowedTimeUndermesh=-1.000000 +AllowedDistanceUndermeshSquared=490000.000000 +CapCharacterLayoutScalarParams=False +EventLogCauserPrivacy=1 +serverVoiceChat=1 +AvatarsDisabled=False +RestrictAvatarSummoningTime=False +AvatarSummoningTimeWeekdayStart=0 +AvatarSummoningTimeWeekdayEnd=0 +AvatarSummoningTimeWeekendStart=0 +AvatarSummoningTimeWeekendEnd=0 +AvatarLifetime=600.000000 +AvatarSummonTime=60.000000 +MaxDeathMapMarkers=3 +IsBattlEyeEnabled=False +IsVACEnabled=True +CanImportDirectlyFromSameServer=False +ServerTransferServersWhitelist= +MaxAllowedPing=0 +AllowFamilySharedAccount=True +RegionAllowAfrica=True +RegionAllowAsia=True +RegionAllowCentralEurope=True +RegionAllowEasternEurope=True +RegionAllowWesternEurope=True +RegionAllowNorthAmerica=True +RegionAllowOceania=True +RegionAllowSouthAmerica=True +RegionBlockList= +ServerModList= +BuildingPickupEnabled=True +PoiProtectionEnabled=False +EventSystemEnabled=True +StabilityLossMultiplier=1.000000 +BuildingValidationEnabled=False +AllowBuildingAnywhere=False +HealthbarVisibilityDistance=45000.000000 +ServerMergeOutgoingTime=0 +ServerMergeDestination= +DisableChatFormatting=False +EnableLoginQueue=True +DisconnectionGraceTime=180 +bCanBeDamaged=True + + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..cdae564 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,15 @@ +version: '3' + +services: + conan: + build: ./image + image: conan-server + restart: always + volumes: + - ./data/:/data + ports: + - "7777:7777/udp" + - "7777:7777/tcp" + - "7778:7778/udp" + - "25575:25575/tcp" + - "27015:27015/udp" diff --git a/image/Dockerfile b/image/Dockerfile new file mode 100644 index 0000000..e0bb30e --- /dev/null +++ b/image/Dockerfile @@ -0,0 +1,23 @@ +FROM ubuntu:24.04 + +RUN dpkg --add-architecture i386 +RUN apt update && apt upgrade -y + +RUN apt install -y locales +RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 + +RUN TZ=Europe/Moscow && \ +ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \ +echo $TZ > /etc/timezone + +RUN echo steam steam/question select "I AGREE" | debconf-set-selections +RUN echo steam steam/license note '' | debconf-set-selections +RUN apt install -y software-properties-common lib32gcc-s1 steamcmd wine xvfb + +ENV WINEARCH=win64 +ENV WINEPREFIX=/data/wine64 + +COPY start.sh /root/ +RUN chmod +x /root/start.sh + +ENTRYPOINT ["/root/start.sh"] diff --git a/image/start.sh b/image/start.sh new file mode 100644 index 0000000..10654e6 --- /dev/null +++ b/image/start.sh @@ -0,0 +1,34 @@ +#! /bin/bash + +# conan server install/update +/usr/games/steamcmd +@sSteamCmdForcePlatformType windows +force_install_dir /data/conan_exiles +login anonymous +app_update 443030 +quit + +# mod 300 level +/usr/games/steamcmd +@sSteamCmdForcePlatformType windows +force_install_dir /data/conan_exiles +login anonymous +workshop_download_item 440900 1386174080 +exit + +# Функция для запуска сервера +start_server() { +# conan server start + xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' wine /data/conan_exiles/ConanSandboxServer.exe -log | tee /var/log/conan.log & + SERVER_PID=$! +} + +while true; do + start_server + + # Мониторинг логов на наличие ошибки + tail --pid=$SERVER_PID -n 0 -F /var/log/conan.log | while read LINE; do + echo "$LINE" | grep "Cannot allocate memory" + if [ $? = 0 ]; then + echo "Error 'Cannot allocate memory' detected. Kill $SERVER_PID, restarting server ..." + pkill Xvfb + break + fi + done + + # Ждем, пока сервер завершит работу + wait $SERVER_PID + + # Задержка перед перезапуском + sleep 1 +done