Several improvements to Docker:
- ability to reload configuration files without building again the images - faster images building - corrected a mistake - logs are saved to the main host
This commit is contained in:
parent
05d03747be
commit
0e87deb416
6
.gitignore
vendored
6
.gitignore
vendored
@ -12,8 +12,10 @@ modules/*
|
||||
!modules/*.sh
|
||||
build*/
|
||||
var/*
|
||||
docker/authserver/authserver.conf
|
||||
docker/worldserver/worldserver.conf
|
||||
docker/authserver/etc/authserver.conf
|
||||
docker/worldserver/etc/worldserver.conf
|
||||
docker/authserver/logs/
|
||||
docker/worldserver/logs/
|
||||
!docker/build
|
||||
|
||||
!.gitkeep
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
FROM ubuntu:bionic
|
||||
|
||||
COPY --from=azerothcore/build:latest /azeroth-server /azeroth-server
|
||||
COPY authserver.conf.dist /azeroth-server/etc/authserver.conf
|
||||
COPY authserver.conf /azeroth-server/etc/authserver.conf
|
||||
RUN apt update && apt install -y libmysqlclient-dev libssl-dev libace-6.* libace-dev;
|
||||
|
||||
RUN apt update && apt install -y libmysqlclient-dev libssl-dev libace-6.* libace-dev; \
|
||||
rm /azeroth-server/etc/worldserver.conf.dist; \
|
||||
mkdir /azeroth-server/logs;
|
||||
COPY --from=azerothcore/build:latest /azeroth-server/bin /azeroth-server/bin
|
||||
|
||||
CMD ["/azeroth-server/bin/authserver"]
|
||||
|
||||
@ -8,7 +8,7 @@ This provides a way to launch a container with the AzerothCore authserver runnin
|
||||
|
||||
- You need to first build the [AzerothCore Build Image](https://github.com/azerothcore/azerothcore-wotlk/tree/master/docker/build).
|
||||
|
||||
- You have to copy the file `docker/authserver/authserver.conf.dist` and rename the copied file to `docker/authserver/authserver.conf`. Then open it and change the values where needed (you may need to change the DB port).
|
||||
- You have to copy the file `docker/authserver/etc/authserver.conf.dockerdist` and rename the copied file to `docker/authserver/etc/authserver.conf`. Then open it and change the values where needed (you may need to change the DB port).
|
||||
|
||||
## Building the container image
|
||||
|
||||
@ -20,6 +20,12 @@ To build the container image you have to be in the **main** folder of your local
|
||||
|
||||
## Run the container
|
||||
|
||||
```docker run --name azt-authserver --network host -it azerothcore/authserver```
|
||||
```
|
||||
docker run --name azt-authserver \
|
||||
--mount type=bind,source="$(pwd)"/docker/authserver/etc/,target=/azeroth-server/etc \
|
||||
--mount type=bind,source="$(pwd)"/docker/authserver/logs/,target=/azeroth-server/logs \
|
||||
--network host \
|
||||
-it azerothcore/authserver
|
||||
```
|
||||
|
||||
*For more information about the `docker run` command, check the [docker run doc](https://docs.docker.com/engine/reference/run/).*
|
||||
|
||||
0
docker/authserver/etc/.gitkeep
Normal file
0
docker/authserver/etc/.gitkeep
Normal file
271
docker/authserver/etc/authserver.conf.dist
Normal file
271
docker/authserver/etc/authserver.conf.dist
Normal file
@ -0,0 +1,271 @@
|
||||
###############################################
|
||||
# AzerothCore Auth Server configuration file #
|
||||
###############################################
|
||||
[authserver]
|
||||
|
||||
###################################################################################################
|
||||
# SECTION INDEX
|
||||
#
|
||||
# EXAMPLE CONFIG
|
||||
# AUTH SERVER SETTINGS
|
||||
# MYSQL SETTINGS
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
###################################################################################################
|
||||
# EXAMPLE CONFIG
|
||||
#
|
||||
# Variable
|
||||
# Description: Brief description what the variable is doing.
|
||||
# Important: Annotation for important things about this variable.
|
||||
# Example: "Example, i.e. if the value is a string"
|
||||
# Default: 10 - (Enabled|Comment|Variable name in case of grouped config options)
|
||||
# 0 - (Disabled|Comment|Variable name in case of grouped config options)
|
||||
#
|
||||
# Note to developers:
|
||||
# - Copy this example to keep the formatting.
|
||||
# - Line breaks should be at column 100.
|
||||
###################################################################################################
|
||||
|
||||
###################################################################################################
|
||||
# AUTH SERVER SETTINGS
|
||||
#
|
||||
# LogsDir
|
||||
# Description: Logs directory setting.
|
||||
# Important: LogsDir needs to be quoted, as the string might contain space characters.
|
||||
# Logs directory must exists, or log file creation will be disabled.
|
||||
# Default: "" - (Log files will be stored in the current path)
|
||||
|
||||
LogsDir = ""
|
||||
|
||||
#
|
||||
# MaxPingTime
|
||||
# Description: Time (in minutes) between database pings.
|
||||
# Default: 30
|
||||
|
||||
MaxPingTime = 30
|
||||
|
||||
#
|
||||
# RealmServerPort
|
||||
# Description: TCP port to reach the auth server.
|
||||
# Default: 3724
|
||||
|
||||
RealmServerPort = 3724
|
||||
|
||||
#
|
||||
#
|
||||
# BindIP
|
||||
# Description: Bind auth server to IP/hostname
|
||||
# Default: "0.0.0.0" - (Bind to all IPs on the system)
|
||||
|
||||
BindIP = "0.0.0.0"
|
||||
|
||||
#
|
||||
# PidFile
|
||||
# Description: Auth server PID file.
|
||||
# Example: "./authserver.pid" - (Enabled)
|
||||
# Default: "" - (Disabled)
|
||||
|
||||
PidFile = ""
|
||||
|
||||
#
|
||||
# LogLevel
|
||||
# Description: Server console level of logging
|
||||
# Default: 0 - (Minimum)
|
||||
# 1 - (Basic)
|
||||
# 2 - (Detail)
|
||||
# 3 - (Full/Debug)
|
||||
|
||||
LogLevel = 0
|
||||
|
||||
#
|
||||
# LogFile
|
||||
# Description: Log file for main server log.
|
||||
# Default: "Auth.log" - (Enabled)
|
||||
# "" - (Disabled)
|
||||
|
||||
LogFile = "Auth.log"
|
||||
|
||||
#
|
||||
# Debug Log Mask
|
||||
# Description: Bitmask that determines which debug log output (level 3)
|
||||
# will be logged.
|
||||
# Possible flags:
|
||||
#
|
||||
# 64 - Anything related to network input/output,
|
||||
# such as packet handlers and netcode logs
|
||||
#
|
||||
# Simply add the values together to create a bitmask.
|
||||
# For more info see enum DebugLogFilters in Log.h
|
||||
#
|
||||
# Default: 0 (nothing)
|
||||
|
||||
DebugLogMask = 64
|
||||
|
||||
#
|
||||
# SQLDriverLogFile
|
||||
# Description: Log file for SQL driver events.
|
||||
# Example: "SQLDriver.log" - (Enabled)
|
||||
# Default: "" - (Disabled)
|
||||
|
||||
SQLDriverLogFile = ""
|
||||
|
||||
#
|
||||
# SQLDriverQueryLogging
|
||||
# Description: Log SQL queries to the SQLDriverLogFile and console.
|
||||
# Default: 0 - (Disabled, Query errors only)
|
||||
# 1 - (Enabled, Full query logging - may have performance impact)
|
||||
|
||||
SQLDriverQueryLogging = 0
|
||||
|
||||
#
|
||||
# LogTimestamp
|
||||
# Description: Append timestamp to the server log file name.
|
||||
# Logname_YYYY-MM-DD_HH-MM-SS.Ext for Logname.Ext
|
||||
# Default: 0 - (Disabled)
|
||||
# 1 - (Enabled)
|
||||
|
||||
LogTimestamp = 0
|
||||
|
||||
#
|
||||
# LogFileLevel
|
||||
# Description: Server file level of logging
|
||||
# Default: 0 - (Minimum)
|
||||
# 1 - (Basic)
|
||||
# 2 - (Detail)
|
||||
# 3 - (Full/Debug)
|
||||
|
||||
LogFileLevel = 0
|
||||
|
||||
#
|
||||
# LogColors
|
||||
# Description: Colors for log messages (Format: "normal basic detail debug").
|
||||
# Colors: 0 - Black
|
||||
# 1 - Red
|
||||
# 2 - Green
|
||||
# 3 - Brown
|
||||
# 4 - Blue
|
||||
# 5 - Magenta
|
||||
# 6 - Cyan
|
||||
# 7 - Grey
|
||||
# 8 - Yellow
|
||||
# 9 - Lred
|
||||
# 10 - Lgreen
|
||||
# 11 - Lblue
|
||||
# 12 - Lmagenta
|
||||
# 13 - Lcyan
|
||||
# 14 - White
|
||||
# Example: "13 11 9 5" - (Enabled)
|
||||
# Default: "" - (Disabled)
|
||||
|
||||
LogColors = ""
|
||||
|
||||
#
|
||||
# EnableLogDB
|
||||
# Description: Write log messages to database (LogDatabaseInfo).
|
||||
# Default: 0 - (Disabled)
|
||||
# 1 - (Enabled)
|
||||
|
||||
EnableLogDB = 0
|
||||
|
||||
#
|
||||
# DBLogLevel
|
||||
# Description: Log level of databases logging.
|
||||
# Default: 1 - (Basic)
|
||||
# 0 - (Minimum)
|
||||
# 2 - (Detail)
|
||||
# 3 - (Full/Debug)
|
||||
|
||||
DBLogLevel = 1
|
||||
|
||||
#
|
||||
# UseProcessors
|
||||
# Description: Processors mask for Windows and Linux based multi-processor systems.
|
||||
# Example: For a computer with 3 CPUs:
|
||||
# 1 - 1st CPU only
|
||||
# 2 - 2nd CPU only
|
||||
# 4 - 3rd CPU only
|
||||
# 6 - 2nd + 3rd CPUs, because "2 | 4" -> 6
|
||||
# Default: 0 - (Selected by OS)
|
||||
# 1+ - (Bit mask value of selected processors)
|
||||
|
||||
UseProcessors = 0
|
||||
|
||||
#
|
||||
# ProcessPriority
|
||||
# Description: Process priority setting for Windows and Linux based systems.
|
||||
# Details: On Linux, a nice value of -15 is used. (requires superuser). On Windows, process is set to HIGH class.
|
||||
# Default: 0 - (Normal)
|
||||
# 1 - (High)
|
||||
|
||||
ProcessPriority = 0
|
||||
|
||||
#
|
||||
# RealmsStateUpdateDelay
|
||||
# Description: Time (in seconds) between realm list updates.
|
||||
# Default: 20 - (Enabled)
|
||||
# 0 - (Disabled)
|
||||
|
||||
RealmsStateUpdateDelay = 20
|
||||
|
||||
#
|
||||
# WrongPass.MaxCount
|
||||
# Description: Number of login attemps with wrong password before the account or IP will be
|
||||
# banned.
|
||||
# Default: 0 - (Disabled)
|
||||
# 1+ - (Enabled)
|
||||
|
||||
WrongPass.MaxCount = 0
|
||||
|
||||
#
|
||||
# WrongPass.BanTime
|
||||
# Description: Time (in seconds) for banning account or IP for invalid login attempts.
|
||||
# Default: 600 - (10 minutes)
|
||||
# 0 - (Permanent ban)
|
||||
|
||||
WrongPass.BanTime = 600
|
||||
|
||||
#
|
||||
# WrongPass.BanType
|
||||
# Description: Ban type for invalid login attempts.
|
||||
# Default: 0 - (Ban IP)
|
||||
# 1 - (Ban Account)
|
||||
|
||||
WrongPass.BanType = 0
|
||||
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
###################################################################################################
|
||||
# MYSQL SETTINGS
|
||||
#
|
||||
# LoginDatabaseInfo
|
||||
# Description: Database connection settings for the realm server.
|
||||
# Example: "hostname;port;username;password;database"
|
||||
# ".;somenumber;username;password;database" - (Use named pipes on Windows
|
||||
# "enable-named-pipe" to [mysqld]
|
||||
# section my.ini)
|
||||
# ".;/path/to/unix_socket;username;password;database" - (use Unix sockets on
|
||||
# Unix/Linux)
|
||||
# Default: "127.0.0.1;3306;acore;acore;auth"
|
||||
|
||||
LoginDatabaseInfo = "127.0.0.1;3306;acore;acore;acore_auth"
|
||||
|
||||
#
|
||||
# LoginDatabase.WorkerThreads
|
||||
# Description: The amount of worker threads spawned to handle asynchronous (delayed) MySQL
|
||||
# statements. Each worker thread is mirrored with its own connection to the
|
||||
# Default: 1
|
||||
|
||||
LoginDatabase.WorkerThreads = 1
|
||||
|
||||
#
|
||||
# LoginDatabase.SynchThreads
|
||||
# Description: The amount of MySQL connections spawned to handle.
|
||||
# Default: 1 - (LoginDatabase.WorkerThreads)
|
||||
#
|
||||
|
||||
LoginDatabase.SynchThreads = 1
|
||||
|
||||
#
|
||||
###################################################################################################
|
||||
@ -4,7 +4,7 @@
|
||||
[authserver]
|
||||
|
||||
# Do not change this
|
||||
LogsDir = "/azeroth-server/etc/logs"
|
||||
LogsDir = "/azeroth-server/logs"
|
||||
|
||||
# Change this configuration accordingly with your setup
|
||||
LoginDatabaseInfo = "127.0.0.1;3600;root;password;acore_auth"
|
||||
@ -1,11 +1,7 @@
|
||||
FROM ubuntu:bionic
|
||||
|
||||
COPY --from=azerothcore/build:latest /azeroth-server /azeroth-server
|
||||
COPY worldserver.conf.dist /azeroth-server/etc/worldserver.conf
|
||||
COPY worldserver.conf /azeroth-server/etc/worldserver.conf
|
||||
RUN apt update && apt install -y libmysqlclient-dev libssl-dev libace-6.* libace-dev libreadline-dev;
|
||||
|
||||
RUN apt update && apt install -y libmysqlclient-dev libssl-dev libace-6.* libace-dev libreadline-dev; \
|
||||
rm /azeroth-server/etc/authserver.conf.dist; \
|
||||
mkdir /azeroth-server/logs;
|
||||
COPY --from=azerothcore/build:latest /azeroth-server/bin /azeroth-server/bin
|
||||
|
||||
CMD ["/azeroth-server/bin/worldserver"]
|
||||
|
||||
@ -8,7 +8,7 @@ This provides a way to launch a container with the AzerothCore authserver runnin
|
||||
|
||||
- You need to first build the [AzerothCore Build Image](https://github.com/azerothcore/azerothcore-wotlk/tree/master/docker/build).
|
||||
|
||||
- You have to copy the file `docker/worldserver/worldserver.conf.dist` and rename the copied file to `docker/worldserver/worldserver.conf`. Then open it and change the values where needed (you may need to change the DB port).
|
||||
- You have to copy the file `docker/worldserver/worldserver.conf.dockerdist` and rename the copied file to `docker/worldserver/worldserver.conf`. Then open it and change the values where needed (you may need to change the DB port).
|
||||
|
||||
- You need to have the **data files** somewhere in your system. If you don't have them yet, check the step ["Download the data files" from the installation guide](https://github.com/AzerothCore/azerothcore-wotlk/wiki/Installation#5-download-the-data-files).
|
||||
|
||||
@ -24,6 +24,13 @@ To build the container image you have to be in the **main** folder of your local
|
||||
|
||||
Replace `/path/to/your/data` with the path of where your data folder is.
|
||||
|
||||
```docker run --name azt-worldserver --mount type=bind,source=/path/to/your/data,target=/azeroth-server/data --network host -it azerothcore/worldserver```
|
||||
```
|
||||
docker run --name azt-worldserver \
|
||||
--mount type=bind,source=/mnt/70DD9E0635B3A813/azeroth-server/data,target=/azeroth-server/data \
|
||||
--mount type=bind,source="$(pwd)"/docker/worldserver/etc/,target=/azeroth-server/etc \
|
||||
--mount type=bind,source="$(pwd)"/docker/worldserver/logs/,target=/azeroth-server/logs \
|
||||
--network host \
|
||||
-it azerothcore/worldserver
|
||||
```
|
||||
|
||||
*For more information about the `docker run` command, check the [docker run doc](https://docs.docker.com/engine/reference/run/).*
|
||||
|
||||
0
docker/worldserver/etc/.gitkeep
Normal file
0
docker/worldserver/etc/.gitkeep
Normal file
3191
docker/worldserver/etc/worldserver.conf.dist
Normal file
3191
docker/worldserver/etc/worldserver.conf.dist
Normal file
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@
|
||||
[worldserver]
|
||||
|
||||
# Do not change those
|
||||
LogsDir = "/azeroth-server/etc/logs"
|
||||
LogsDir = "/azeroth-server/logs"
|
||||
DataDir = "/azeroth-server/data"
|
||||
|
||||
# Change those configuration accordingly with your setup
|
||||
0
docker/worldserver/logs/.gitkeep
Normal file
0
docker/worldserver/logs/.gitkeep
Normal file
Loading…
x
Reference in New Issue
Block a user