Hermsi1337 / docker-ark-server

Dockerize your ARK server - configurable via env
https://hub.docker.com/r/hermsi/ark-server/
MIT License
112 stars 36 forks source link

Some environment properties in docker-compose file not working #68

Closed goliafrsigma closed 2 years ago

goliafrsigma commented 2 years ago

I want to change TZ in my server, but env property in docker-compose not working. I know it has't in wiki, but how can i change time zone? DISABLE_BATTLEYE not working, server still starts with battleye enabled. Judging by the logs of the arkmanager UPDATE_ON_START, PRE_UPDATE_BACKUP, BACKUP_ON_STOP does't work to.

Maybe "true" parameter is wrong syntax?

version: "3.9"
services:
  ark:
    image: hermsi/ark-server:latest
    container_name: ark
    restart: always
    volumes:
      - $HOME/games/ark:/app
    environment:
      - SESSION_NAME=***
      - SERVER_MAP=TheIsland
      - SERVER_PASSWORD=***
      - ADMIN_PASSWORD=***
      - MAX_PLAYERS=2
      - UPDATE_ON_START="true"
      - BACKUP_ON_STOP="true"
      - PRE_UPDATE_BACKUP="true"
      - WARN_ON_STOP="true"
      - DISABLE_BATTLEYE="true"
      - TZ="Europe/Moscow"
    ports:
      - 7777:7777/tcp
      - 7777:7777/udp
      - 7778:7778/tcp
      - 7778:7778/udp
      - 27015:27015/tcp
      - 27015:27015/udp
      - 27020:27020/tcp
      - 27020:27020/udp
Hermsi1337 commented 2 years ago

Hey @goliafrsigma, you must not use " around your environment-variables when using the .yml-array syntax.

If you do use " that way, they will get appended to the variable inside the container. And instead of true you have "true". Which won't work (as you noticed).

Either do:

environment:
  - UPDATE_ON_START=true
  - BACKUP_ON_STOP=true
  - PRE_UPDATE_BACKUP=true

Or:

environment:
  UPDATE_ON_START: "true"
  BACKUP_ON_STOP: "true"
  PRE_UPDATE_BACKUP: "true"
goliafrs commented 2 years ago

Thank you very much, it's much clearer now!

But what about TZ?

Hermsi1337 commented 2 years ago

Sorry, I've missed your response. I will check the TZ-Thing out.

goliafrs commented 2 years ago

Sorry, I've missed your response. I will check the TZ-Thing out.

You can close this issue. TZ env prop works, i did mistake with syntax again.

environment:
  - TZ=Europe/Moscow

It works without quotes.

Thanks for helping!