Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for admins config property, remove edge tag #27

Merged
merged 3 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading