ryansheehan / terraria

Dockerfile for terraria
MIT License
294 stars 104 forks source link

Swarm - bypass options #31

Closed Felipenho closed 4 years ago

Felipenho commented 4 years ago

Hello Ryan,

Do you possibly have any workarounds to work with docker swarm?

The default options as create a new world, choosing the size and etc.?

I was building the image to the latest TShock 4.4.0

I Expect some errors to appear, as they didn't really support 1.4.0.2 at the moment, but... maybe this should work ? xD

services:
  terraria:
    image: terraria-server:1.4.02
    deploy:
      resources:
        limits:
          cpus: '2'
          memory: 4096M
      mode: global
      restart_policy:
        condition: on-failure
        delay: 60s
        max_attempts: 3
        window: 120s
    environment:
    - "-world /world/Taverna.wld"
    networks:
    - terraria
    volumes:
    - /home/ubuntu/terraria/world:/world
    ports:
    - "7777:7777"

networks:
  terraria:
    external: true
ryansheehan commented 4 years ago

I assume you built your own container from source with terraria-server:1.4.02? If not you could try ryshe/terraria:1.4.0.2-pre4-v2?

I just published changes that added a bootstrap script to copy the TShockAPI.dll into the plugins folder.

Felipenho commented 4 years ago

Thanks!

Worked like a charm.

My difficult now is to set all the infos about the world, I mean, is there an option to set all these infos below on the CLI or the swarm file? terrarinha

The difficult, and biome modifications, even the seed

ryansheehan commented 4 years ago

There is no easy way to do that from swarm. There is the "-autocreate

" flag to specify the size of the world. But as far as I can tell nothing else is exposed from TShock to the cli. On Thu, May 21, 2020 at 11:24 AM Felipenho wrote: > Thanks! > > Worked like a charm. > > My difficult now is to set all the infos about the world, I mean, is there > an option to set all these infos below on the CLI or the swarm file? > [image: terrarinha] > > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > , > or unsubscribe > > . >
ryansheehan commented 4 years ago

also the -world flag value is drastically changed. The TShock folks, in their latest update, removed the ability to specify where wld files can be saved. :(

Instead you have to specify the hard coded path /root/.local/share/Terraria/Worlds/.wld

On Thu, May 21, 2020 at 11:37 AM Ryan Sheehan rsheehan@gmail.com wrote:

There is no easy way to do that from swarm. There is the "-autocreate

" flag to specify the size of the world. But as far as I can tell nothing else is exposed from TShock to the cli. On Thu, May 21, 2020 at 11:24 AM Felipenho wrote: > Thanks! > > Worked like a charm. > > My difficult now is to set all the infos about the world, I mean, is > there an option to set all these infos below on the CLI or the swarm file? > [image: terrarinha] > > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > , > or unsubscribe > > . >