brew cask install docker # Install Docker
open /Applications/Docker.app # Start Docker
and then in the dayz-server dir:
docker-compose up
it runs the mongo and redis, and uses ../data for the mongo storage
if you need to run npm install or anything just do
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0a9d6571de68 node:8 "npm start" 23 minutes ago Up 12 minutes 0.0.0.0:3000->3000/tcp dayzz-server_server_1
820ef316b25c mongo "docker-entrypoint.s…" 23 minutes ago Up 12 minutes 27017/tcp dayzz-server_mongo_1
64e8f9ba2081 redis "docker-entrypoint.s…" 32 minutes ago Up 12 minutes 6379/tcp dayzz-server_redis_1
to see the name of the server and run
$ docker exec -ti dayzz-server_server_1 sh
to get a shell to the actual machine (on another terminal)
or just the npm install directly
$ docker exec -ti dayzz-server_server_1 npm install
notice the use of node:8
. basically you don't have to install anything locally so it makes the process of setting up a new environment a breeze