Giter VIP home page Giter VIP logo

l2j-docker's Introduction

L2JServer in Docker

Run L2J server and it's CLI using Docker.

After running the setup, you will have:

  • a login server with it's own database and the CLI available
  • a game server with it's own database

Why separated? This way you can have the login server in one machine and the game server in other so the login server doesn't consume resources from the game server.

Setting up Login server

Initial container build

cd login
docker-compose build

Start MariaDB with docker-compose up db

Once the previous command finishes (it should print mysqld: ready for connections.) open up a new terminal and create the database

docker-compose run --rm cli
db install -sql login/sql -t LOGIN -c -mods -m FULL
> Seems database already exists, do you want to continue installing? (y/N): y
quit

And now we can start the login server with docker-compose up

Setting up game server

Initial container build

cd game
docker-compose build

Start MariaDB with docker-compose up db

Once the previous command finishes (it should print mysqld: ready for connections.) open up a new terminal and create the database

docker-compose run --rm cli
db install -sql game/sql -t GAME -c -mods -m FULL
> Seems database already exists, do you want to continue installing? (y/N): y
quit

Start game server with docker-compose up

After initial setup

Simply start the servers with cd login && docker-compose up -d and cd game && docker-compose up -d. This will leave both servers running in background

Notes

All the services will restart automatically in case of failure.

Configuration

If you need to attach configuration or custom files, you can do so using volumes. Check login/docker-compose.yml:

    volumes:
      - "./config:/usr/loginserver/config"

In this case, we are overwriting the configuration with whatever we got on ./config

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.