You can use a Docker container to run an Ares development environment on your local PC/Mac.
Table of Contents
To set up the container for the first time:
Install Docker Desktop.
Clone the ares-docker repository to your local PC/Mac. You can use GitHub Desktop or any other GitHub tool.
Clone the aresmush and ares-webportal code repos INTO the ares-docker directory. Your directory should now look like this:
ares-docker
- aresmush
- ares-webportal
- data
Copy the aresmush/install/game.distr
directory to create a new folder aresmush/game
.
In a Windows PowerShell or Mac Terminal window, start the container:
cd YOUR_ARES_DOCKER_DIRECTORY
docker-compose up
ares-docker_game_1
depending on how Docker names it: docker exec -it ares-docker_game_1 /bin/bash -l
cd aresmush
bundle install
bundle exec rake configure $*
- Use 127.0.0.1 for the host
- Use default ports (this setup will not work with different ports)
- Ignore the warning about the web portal directory not being found - that's OK.
bundle exec rake init
After initial setup, here are the commands you’ll want to use whenever you want to run the game.
cd YOUR_ARES_DOCKER_DIRECTORY
docker-compose up
ares-docker_game_1
depending on how Docker names it: docker exec -it ares-docker_game_1 /bin/bash -l
cd aresmush
bundle install
bundle exec rake startares[disableproxy]
docker exec -it ares-docker_game_1 /bin/bash -l
cd ares-webportal
npm install --no-audit --no-fund
ember serve
You should now be able to connect to your game on localhost:4201 and connect to the web portal at http://localhost:4200.
hostname
field in server.yml
to “0.0.0.0” and then restart the game. If that still doesn’t work, you can also try setting it to “127.0.0.1”. Some systems have trouble routing “localhost”. If that STILL doesn’t work, ask for help.
Any code changes you make in the aresmush and ares-webportal directories under your ares-docker folder should be automatically seen by the docker container.
ares-docker
- aresmush <<--- make game changes here
- ares-webportal <<--- make web portal changes here
- data
That should trigger a live-reload of the dev portal, and be picked up if you do load <plugin>
from your MUSH client.
Sometimes permissions issues can mess up this automatic code mirroring. If this happens to you:
Your database will be saved in data/dump.rdb
.
The database saves every few minutes. If you want to ensure it’s saved before stopping the container, just use the db/save
command.