-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Docker Compose
WIP PR: https://github.com/otland/forgottenserver/pull/2758
There is also a way of running the server + database at once using docker-compose
.
By default it:
- Creates a database named
forgottenserver
. - Executes
schema.sql
file, so that you don't have to manually import it. - Saves all the database files inside a
./db
local directory.
- Update your
configu.lua
with these values, so that server properly connects to the database:
-- MySQL
mysqlHost = "db"
mysqlUser = "forgottenserver"
mysqlPass = "<your_db_password>"
mysqlDatabase = "forgottenserver"
mysqlPort = 3306
mysqlSock = ""
-
Change your database user password by replacing
<your_db_password>
with your password of choice. Remember to also update it indocker-compose.yml
. -
Change your database root password by replacing
<your_root_password>
indocker-compose.yml
.
docker-compose up -d
docker-compose down
docker-compose up -d --build
- The Forgotten Server -
localhost:7171
,localhost:7172
. - Database - direct connection hidden to the outside world.
- Database explorer -
localhost:8080
. Allows viewing what's inside the database.
-
During startup the server container is created after database, however, the database might not be initially available. This is why the server will restart a couple of times before it successfully establishes the connection.
-
If you are using Docker Toolbox for Windows and it uses VirtualBox, then the server and database explorer address host name will be
192.168.99.100
instead oflocalhost
.