diff --git a/.env.example b/.env.example index 7c6bdaa0..996f964d 100644 --- a/.env.example +++ b/.env.example @@ -51,4 +51,5 @@ BlueTeamScoresUrl=https://od.lk/s/Nl8yMDg4MTc0MzJf/blue_team_scores.mp3 # MaxPlayers=30 # Number of players that can enter the SA-MP Server LagCompMode=1 # Lag Compensation -Port=7777 # The port to be published by the container \ No newline at end of file +Port=7777 # The port to be published by the container +MemoryLimit=1g \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 05b76c56..48c63086 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,7 @@ services: app: build: . env_file: .env + mem_limit: ${MemoryLimit} command: > bash -c "sed -i 's/lagcompmode 1/lagcompmode ${LagCompMode}/' server.cfg && sed -i 's/maxplayers 30/maxplayers ${MaxPlayers}/' server.cfg