forked from fpiesche/docker-hercules-old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
105 lines (94 loc) · 4.71 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
version: '3.2'
services:
game_servers:
# The name format for the pre-built images is "hercules:[server mode]-[packet version]",
# e.g. to run a Renewal server on the latest packet version supported by Hercules, edit
# this to instead be florianpiesche/hercules:renewal-latest.
# If you want to run a local image you've built yourself, edit this to simply be the
# tag for that image, e.g. simply "hercules".
image: florianpiesche/hercules:classic-20180418
restart: on-failure
ports:
# To make your game server accessible over the internet, you will need to forward
# these ports to the IP address of the computer running the server. You do NOT need
# to forward the port for the database server - doing so is insecure, and there is
# login server
- 6900:6900
# character server
- 6121:6121
# map server
- 5121:5121
environment:
# These variables will work for a default setup. Feel free to
# edit their contents to your liking. Make sure to duplicate any
# changes you make in the database service below.
# This is just the host name and the port for the database server.
# If you don't want to set up your own database server, simply
# leave these as they are and your game servers will use the
# database service defined below.
MYSQL_SERVER: database
MYSQL_PORT: 3306
# The user name and password to use for accessing the database.
MYSQL_USER: ragnarok
MYSQL_PASSWORD: ragnarok
# The database to use for your data on the database server.
MYSQL_DATABASE: ragnarok
# The user name and password for the inter-server communication
# account.
INTERSERVER_USER: wisp
INTERSERVER_PASSWORD: wisp
volumes:
# Using volumes to store the configuration means
# your Docker installation will keep the configuration
# outside of the container - so even if you update
# or destroy and rebuild the container, your configuration
# will persist.
- configuration:/hercules/conf/import
- sql_init:/hercules/sql-files/
# This service will cause Docker to also bring up a database service to
# use with your Hercules servers. Having a separate container for this is useful
# as the database will be separate from any other databases you may
# be running, and also saves you having to set up a database server yourself.
# Be sure to mirror any changes to the environment variables you make above
# in the variables here!
database:
image: mariadb:10.4
restart: on-failure
depends_on:
- game_servers
environment:
# The password for the "root" (administrator) user on the database.
# If you're not planning on doing anything that requires administrator
# access to the database, you can comment this line out and the mariadb
# image will generate a random password for the root user on first startup,
# which is more secure than having a default one.
MYSQL_ROOT_PASSWORD: hercroot
# The user name and password to create for the Hercules servers
# to connect to the database.
MYSQL_USER: ragnarok
MYSQL_PASSWORD: ragnarok
# The database to create for the Hercules servers. This will be
# automatically set up using the SQL files required for the initial
# Ragnarok database for your selected server mode, as per Hercules
# documentation.
MYSQL_DATABASE: ragnarok
# The user name and password for the inter-server communication
# user Hercules uses.
INTERSERVER_USER: wisp
INTERSERVER_PASSWORD: wisp
expose:
# Rather than "ports" as for the game servers, we're using "expose" to specify
# the port for the database service. This means the database will *only* be
# accessible to other services in this compose file but not from the host
# computer itself, which is more secure as only the game servers need
# access to the database.
- 3306
volumes:
# Again, using a volume for the database data means that even if you
# destroy and rebuild the database service, your database will remain.
- mysql_data:/var/lib/mysql
- sql_init:/docker-entrypoint-initdb.d
volumes:
mysql_data:
configuration:
sql_init: