Didstopia / 7dtd-server

Provides a dedicated linux server for 7 Days to Die running inside a Docker container.
MIT License
108 stars 45 forks source link

Is it possible to set the timezone in the container? #39

Closed unknownFalleN closed 3 years ago

unknownFalleN commented 3 years ago

Hi,

thank you very much for the great project. Would like to adjust the time zone of the container to the host system.

Unfortunately I have not been able to do this yet.

Is it possible to adapt them?

version: "3.8"

networks:
    7dtd_proxy:
        external:
            name: 7dtd_proxy

services:
  7dtd:
    image: didstopia/7dtd-server
    container_name: 7dtd
    environment:
      - SEVEN_DAYS_TO_DIE_UPDATE_CHECKING="0"
      - TZ="Europe/Berlin"
      #- SEVEN_DAYS_TO_DIE_BRANCH="public"
      #- SEVEN_DAYS_TO_DIE_SERVER_STARTUP_ARGUMENTS="-logfile /dev/stdout -quit -batchmode -nographics -dedicated"
      #- SEVEN_DAYS_TO_DIE_CONFIG_FILE="/app/.local/share/7DaysToDie/serverconfig.xml"
      #- SEVEN_DAYS_TO_DIE_START_MODE="0"
      #- SEVEN_DAYS_TO_DIE_TELNET_PORT=""
      #- SEVEN_DAYS_TO_DIE_TELNET_PASSWORD=""
    ports:
      - "26900:26900/tcp"
      - "26900:26900/udp"
      - "26901:26901/udp"
      - "26902:26902/udp"
    networks:
       - 7dtd_proxy
    volumes:
      - app:/app/.local/share/7DaysToDie
      - steamcmd:/steamcmd/7dtd
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone.ro
    restart: unless-stopped
    logging:
      options:
        max-size: '12m'
        max-file: '5'
      driver: json-file

volumes:
  app:
    name: 7dtd-data
    driver: local
  steamcmd:
    name: 7dtd-steamcmd
    driver: local
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Dids commented 3 years ago

Setting the TZ variable should be enough. Does it not work? Where do you see it not working as expected?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.