
* Add dockerised local development environment * Enable tini (--init) for server container See https://docs.docker.com/compose/compose-file/#init for details * Add local development environment documentation * Add a tip for how-to connect a client on the same machine * Add specialized tools/docker folder Co-authored-by: Eric <latiosworks@gmail.com>
40 lines
1.4 KiB
YAML
40 lines
1.4 KiB
YAML
version: "3.7"
|
|
|
|
services:
|
|
db:
|
|
image: "mariadb:bionic"
|
|
container_name: "rathena_db"
|
|
ports:
|
|
- "3306:3306" # allow DB connections from host
|
|
volumes:
|
|
- "rathenadb:/var/lib/mysql" # save database to local disk
|
|
- "../../sql-files/:/docker-entrypoint-initdb.d" # initialize db with ./sql-files
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: ragnarok
|
|
MYSQL_DATABASE: ragnarok
|
|
MYSQL_USER: ragnarok
|
|
MYSQL_PASSWORD: ragnarok
|
|
server:
|
|
image: "rathena:local"
|
|
container_name: "rathena"
|
|
ports:
|
|
- "5121:5121" # map server
|
|
- "6121:6121" # char server
|
|
- "6900:6900" # login server
|
|
volumes:
|
|
- "../..:/rathena" # mount git repo directory inside container
|
|
- "./asset/inter_conf.txt:/rathena/conf/import/inter_conf.txt" # load db connection
|
|
- "./asset/char_conf.txt:/rathena/conf/import/char_conf.txt" #localdev login-char relation
|
|
- "./asset/map_conf.txt:/rathena/conf/import/map_conf.txt" #localdev char-map relation
|
|
init: true # helps with signal forwarding and process reaping
|
|
tty: true
|
|
stdin_open: true
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
depends_on:
|
|
- db
|
|
|
|
volumes:
|
|
rathenadb:
|