Skip to content

Use docker environment variables to change server settings. #342

Open

Description

@harrisonfry

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions