Skip to content

Commit

Permalink
change fivem server to init container
Browse files Browse the repository at this point in the history
  • Loading branch information
Buh13246 committed Nov 23, 2023
1 parent 0d73cd2 commit 33dca79
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 4 deletions.
10 changes: 6 additions & 4 deletions fivem/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM ich777/fivemserver
FROM ubuntu

RUN sed -i 's/30120/30124/g' configs/server.cfg
RUN sed -i 's/\#sv_master1/sv_master1/g' configs/server.cfg
RUN sed -i 's/sv_maxclients 32/sv_maxclients 10/g' configs/server.cfg
COPY server.cfg .

RUN sed -i 's/30120/30124/g' server.cfg
RUN sed -i 's/\#sv_master1/sv_master1/g' server.cfg
RUN sed -i 's/sv_maxclients 32/sv_maxclients 10/g' server.cfg
62 changes: 62 additions & 0 deletions fivem/server.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# You probably don't want to change these!
# Only change them if you're using a server with multiple network interfaces.
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"

# These resources will start by default.
start mapmanager
start chat
start spawnmanager
start sessionmanager
start fivem
start hardcap
start rconlog
start scoreboard
start playernames

# This allows players to use scripthook based plugins such as lambda menu.
# Set this to 0 to disallow scripthook.
sv_scriptHookAllowed 1

# Uncomment this to enable RCON. Make sure to change the password.
#rcon_password changeme

# A comma-separated list of tags for your server.
# For example:
# - sets tags "drifting, cars, racing"
# Or:
# - sets tags "roleplay, military, tanks"
sets tags "default"

# Set an optional server info and connecting banner image url.
# Size doesn't matter, any banner sized image will be fine.
#sets banner_detail "http://url.to/image.png"
#sets banner_connecting "http://url.to/image.png"

# Nested configs!
#exec server_internal.cfg

# Loading a server icon (96x96 PNG file)
#load_server_icon myLogo.png

# convars which can be used in scripts
set temp_convar "hey world!"

# Uncomment this line if you do not want your server to be listed in the server browser.
#sv_master1 ""

# Want to only allow players authenticated with a third-party provider like Steam?
# Don't forget Social Club is a third party provider too!
#sv_authMaxVariance 1
#sv_authMinTrust 5

# Add system admins
add_ace group.admin command allow # allow all commands
add_ace group.admin command.quit deny # but don't allow quit
add_principal identifier.steam:110000112345678 group.admin # add the admin to the group

# Hide player endpoints in external log output.
sv_endpointprivacy true

# Server player slot limit (must be between 1 and 32)
sv_maxclients 32

0 comments on commit 33dca79

Please sign in to comment.