TiltedEvolution icon indicating copy to clipboard operation
TiltedEvolution copied to clipboard

Use docker environment variables to change server settings.

Open TinFoilFox opened this issue 2 years ago • 0 comments

Description

Allow the use of docker environment variables to change server settings.

Additional Info

This would allow easy one-command deployment of a server with all the correct settings without having to manually edit a config file and restart the server.

Defined environment variables would override the values found in the STServer.ini file.

Examples

As a docker-compose file:

version: "3.9"

services:
  skyrim-together-reborn:
    container_name: skyrim-together-reborn
    image: tiltedphoques/st-reborn-server:latest
    ports:
      - "10578:10578/udp"
    environment:
      FGOLDLOSSFACTOR: '100'
      UDIFFICULTY: '3'
      BENABLEMODCHECK: 'true'
      SPASSWORD: 'supersecretpassword'
    volumes:
     - /opt/docker/skyrimserver/config:/home/server/config
     - /opt/docker/skyrimserver/logs:/home/server/logs
     - /opt/docker/skyrimserver/Data:/home/server/Data

or as in a docker command:

docker run -d -it \
--name skyrim-together-reborn \
-p 10578:10578/udp \
-e FGOLDLOSSFACTOR='100' \
-e UDIFFICULTY='3' \
-e BENABLEMODCHECK='true' \
-e SPASSWORD='supersecretpassword' \
-v /opt/docker/skyrimserver/config:/home/server/config \
-v /opt/docker/skyrimserver/Data:/home/server/Data \
-v /opt/docker/skyrimserver/logs:/home/server/logs \
tiltedphoques/st-reborn-server:latest

TinFoilFox avatar Jul 16 '22 19:07 TinFoilFox