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

Can't find logfile for fail2ban setup #153

Open
herms123 opened this issue Jan 20, 2023 · 0 comments
Open

Can't find logfile for fail2ban setup #153

herms123 opened this issue Jan 20, 2023 · 0 comments

Comments

@herms123
Copy link

herms123 commented Jan 20, 2023

Thank you for your work maintaining the images!

I am trying to save the server logs to the host to setup fail2ban.

A separate directory can be volumed in for storing logs outside of the image

The logs inside the container seems to be empty. Mapping it to host creates an empty log folder.

Am I missing something?

Full docker-compose file

version: "3"

services:

  terraria:
      image: ryshe/terraria:vanilla-latest
      container_name: terraria
      ports:
        - "7777:7777"
      volumes:
        - ./world:/root/.local/share/Terraria/Worlds
        - ./logs:/terraria-server/logs
      environment:
        - WORLD_FILENAME=gangleton.wld
        - CONFIGPATH=/config
        - CONFIG_FILENAME=serverconfig.txt
        - TZ=Africa/Johannesburg
        - LOGPATH=/terraria-server/logs
      logging:
        options:
          max-size: "200k"
      restart: always
      tty: true
      stdin_open: true

I have tried changing the Env Logpath but still only shows blank logs folder.

I have come across this proposed workaround in a forum post but I think that will only work if Terraria is not running on docker?
./terraria | tee -a terraria.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant