Skip to content

Commit

Permalink
Merge pull request #27 from sdsznsk/feat_passwordless_admins
Browse files Browse the repository at this point in the history
  • Loading branch information
jonpas authored Nov 23, 2023
2 parents f1e0b62 + b48cefb commit 3c09f39
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ ENV SERVER_A2S_PORT=""
ENV GAME_NAME="Arma Reforger Docker Server"
ENV GAME_PASSWORD=""
ENV GAME_PASSWORD_ADMIN=""
# GAME_ADMINS - comma-delimited list of identityIds and/or steamIds
ENV GAME_ADMINS=""
ENV GAME_SCENARIO_ID="{ECC61978EDCC2B5A}Missions/23_Campaign.conf"
ENV GAME_MAX_PLAYERS=32
ENV GAME_VISIBLE=true
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version: '3.8'
services:
arma-reforger:
image: ghcr.io/acemod/arma-reforger:edge
image: ghcr.io/acemod/arma-reforger:latest
platform: linux/amd64
container_name: arma-reforger
ports:
Expand Down
1 change: 1 addition & 0 deletions docker_default.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"name": "Arma Reforger Docker Server",
"password": "",
"passwordAdmin": "",
"admins": [],
"scenarioId": "{ECC61978EDCC2B5A}Missions/23_Campaign.conf",
"maxPlayers": 32,
"visible": true,
Expand Down
4 changes: 4 additions & 0 deletions launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ def bool_str(text):
adminPassword = random_passphrase()
config["game"]["passwordAdmin"] = adminPassword
print(f"Admin password: {adminPassword}")
if env_defined("GAME_ADMINS"):
admins = str(os.environ["GAME_ADMINS"]).split(",")
admins[:] = [admin for admin in admins if admin] # Remove empty items form list
config["game"]["admins"] = admins
if env_defined("GAME_SCENARIO_ID"):
config["game"]["scenarioId"] = os.environ["GAME_SCENARIO_ID"]
if env_defined("GAME_MAX_PLAYERS"):
Expand Down

0 comments on commit 3c09f39

Please sign in to comment.