Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More worlds #42

Closed
Simple-Young opened this issue Aug 6, 2021 · 7 comments
Closed

More worlds #42

Simple-Young opened this issue Aug 6, 2021 · 7 comments

Comments

@Simple-Young
Copy link

emmm,I want to know how could i create more words and start them.
more words just the dst-server have more words in Cluster_1 floder, this floder have another word except 'Cave' and 'Master',it maybe have 'Master1' floder and the 'Master1' floder represent anthoer word.
so, i want to know how can i add one or more word into dst-server.
Tips: i have find that i should revise the supervisor.conf file ,but i don't know how to change it.
That's all i thought.

@Jamesits
Copy link
Owner

Jamesits commented Aug 8, 2021

Do you need more independent servers or you need more worlds where people can connect to one server and travel between each other?

For the first use case, I recommend just spawning 2 docker containers. This gives you better control over the server resources each server use, and some sort of security isolation (i.e. if one server is hacked, the hacker would need to escape docker to hack the other server).

For the latter use case, I think you need to modify supervisor.conf and add more server configs into it. But I'm not sure if it would actually work -- I've never seen anyone doing this before. The multi server functionality is really just made for caves.

@Simple-Young
Copy link
Author

Do you need more independent servers or you need more worlds where people can connect to one server and travel between each other?

For the first use case, I recommend just spawning 2 docker containers. This gives you better control over the server resources each server use, and some sort of security isolation (i.e. if one server is hacked, the hacker would need to escape docker to hack the other server).

For the latter use case, I think you need to modify supervisor.conf and add more server configs into it. But I'm not sure if it would actually work -- I've never seen anyone doing this before. The multi server functionality is really just made for caves.

thank for reply,i will try to modify supervisor.conf

@Hicsy
Copy link

Hicsy commented Aug 29, 2021

the multi-shard capability will normally link as many as you want... but beware that any more than 2 worlds will need manual wormholes linking each.

@Jamesits
Copy link
Owner

@Hicsy Thank you very much for the information!

@Jamesits Jamesits changed the title More words More worlds Aug 29, 2021
@Hantsch
Copy link

Hantsch commented Sep 1, 2021

Hi, I had the same requirement.
I did some changes and build the docker image again to allow this.
I also created a pull request if this would be something to be considered: #44

I outsourced the supervisor.conf to be run from the mounted volume so I can change it when needed.
Our dst server we playing on runs 5 shards, this is the supervisor.conf I am using:

[supervisord]
nodaemon=true
logfile=/dev/null
logfile_maxbytes=0
pidfile=/var/run/supervisord.pid

[unix_http_server]
file=/var/run/supervisor.sock

[rpcinterface:supervisor]
supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///var/run/supervisor.sock

[program:dst-server-master]
user=%(ENV_DST_USER)s
group=%(ENV_DST_GROUP)s
command=dontstarve_dedicated_server_nullrenderer -persistent_storage_root %(ENV_DST_USER_DATA_PATH)s -ugc_directory %(ENV_DST_USER_DATA_PATH)s/ugc -shard Master
startsecs=40
startretries=0
autorestart=unexpected
exitcodes=0
stopwaitsecs=720
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/dev/fd/2
stderr_logfile_maxbytes=0

[program:dst-server-cave]
user=%(ENV_DST_USER)s
group=%(ENV_DST_GROUP)s
command=dontstarve_dedicated_server_nullrenderer -persistent_storage_root %(ENV_DST_USER_DATA_PATH)s -ugc_directory %(ENV_DST_USER_DATA_PATH)s/ugc -shard Caves
startsecs=40
startretries=0
autorestart=unexpected
exitcodes=0
stopwaitsecs=720
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/dev/fd/2
stderr_logfile_maxbytes=0

[program:dst-server-loot]
user=%(ENV_DST_USER)s
group=%(ENV_DST_GROUP)s
command=dontstarve_dedicated_server_nullrenderer -persistent_storage_root %(ENV_DST_USER_DATA_PATH)s -ugc_directory %(ENV_DST_USER_DATA_PATH)s/ugc -shard Loot
startsecs=40
startretries=0
autorestart=unexpected
exitcodes=0
stopwaitsecs=720
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/dev/fd/2
stderr_logfile_maxbytes=0

[program:dst-server-caveloot]
user=%(ENV_DST_USER)s
group=%(ENV_DST_GROUP)s
command=dontstarve_dedicated_server_nullrenderer -persistent_storage_root %(ENV_DST_USER_DATA_PATH)s -ugc_directory %(ENV_DST_USER_DATA_PATH)s/ugc -shard CaveLoot
startsecs=40
startretries=0
autorestart=unexpected
exitcodes=0
stopwaitsecs=720
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/dev/fd/2
stderr_logfile_maxbytes=0

[program:dst-server-chrixworld]
user=%(ENV_DST_USER)s
group=%(ENV_DST_GROUP)s
command=dontstarve_dedicated_server_nullrenderer -persistent_storage_root %(ENV_DST_USER_DATA_PATH)s -ugc_directory %(ENV_DST_USER_DATA_PATH)s/ugc -shard ChrixWorld
startsecs=40
startretries=0
autorestart=unexpected
exitcodes=0
stopwaitsecs=720
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
stderr_logfile=/dev/fd/2
stderr_logfile_maxbytes=0

[group:dst-server]
programs=dst-server-master,dst-server-cave,dst-server-loot,dst-server-caveloot,dst-server-chrixworld

@Jamesits
Copy link
Owner

Jamesits commented Sep 1, 2021

@Hantsch Thank you very much for the documentation.

BTW, If you want to override any single file in a Docker container, you can always use -v /path/outside:/path/inside:ro during the container creation (available in docker-compose.yml too); there is no need to do it in the Dockerfile; and the file can be inside the data directory outside the container if you want to. Because editing the default supervisord.conf might substantially change the purpose of the container and might lead to persisted security issues, I'm not going to accept your pull request. Sorry! :)

@Jamesits
Copy link
Owner

Jamesits commented Sep 2, 2021

I'm closing this for now; if you still have problems, please comment below.

@Jamesits Jamesits closed this as completed Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants