ich777 / docker-fivem-server

Docker that installs FiveM and updates on every restart
https://fivem.net/
39 stars 10 forks source link

separation of DATA_DIR and SERVER_DIR #1

Closed GiroudMathias closed 3 years ago

GiroudMathias commented 4 years ago

SERVER_DIR used for citizenfx executable DATA_DIR used for resources folders it is very useful in case DATA_DIR is a git project

ich777 commented 4 years ago

SERVER_DIR used for citizenfx executable DATA_DIR used for resources folders it is very useful in case DATA_DIR is a git project

But the DATA_DIR is not static it's wiped on every change of the container or would should i remove the SERVER_DIR?

GiroudMathias commented 4 years ago

The SERVER_DIR contains only CitizenFX executables. Therefore, it can be separated from DATA_DIR (which is usually the case). In this case, in my infrastructure, DATA_DIR is a GIT repository that is automatically synchronized, and I can't have SERVER_DIR interfering. in doing so, my structure is as follows: /home/docker/server-fivem/citizenfx = SERVER_DIR /home/docker/server-fivem/data = DATA_DIR

ich777 commented 4 years ago

The SERVER_DIR contains only CitizenFX executables. Therefore, it can be separated from DATA_DIR (which is usually the case). In this case, in my infrastructure, DATA_DIR is a GIT repository that is automatically synchronized, and I can't have SERVER_DIR interfering. in doing so, my structure is as follows: /home/docker/server-fivem/citizenfx = SERVER_DIR /home/docker/server-fivem/data = DATA_DIR

Wouldn't it be better to create a new directory in the DATA_DIR (SERVER_DIR - absolute path /serverdata/serverfiles - is located in the DATA_DIR - absolute path /serverdata) like a RESOURCES_DIR - wich the absolute path would be /serverdata/resources - if you do it the way of your pull request the mounted DATA_DIR easily can eventually interfere with the SERVER_DIR.