It is a browser turn-based strategy game for 2-4 players available at https://gavr.games. Below is the developer's guide to set up development environment.
The general idea is to have a set of containers with Lords services installed and working inside of it. Any developer will be able to quickly bring it up and test/develop. We use Docker and Docker Compose to spin up our development environment. You can install Docker here You will also need to install Docker Compose
Once you have all of those installed you should:
docker-compose.yml
file in the root defining all services..env
file from .env.example
chmod o+w ./web/lang/cache
to give write rights to the containers.docker-compose build
. It will build all Dockerfiles and create images for containers.docker-compose up -d
to start all services.docker-compose exec db /database/bin/lords_db_init.sh
/etc/hosts
(domain name lords.local
is specified in .env
):
# Lords
127.0.0.1 lords.local
docker-compose ps
command. The game should be available via http://lords.localdocker-compose up -d
docker-compose stop
docker exec web COMMAND
docker-compose exec web /bin/bash
docker-compose run web COMMAND
docker-compose kill web
+ docker-compose rm web
(it could be useful to recreate container when something went wrong).You can change web
to any container name, see docker-compose.yml
.
Each container syncs required folders in both directions (see docker-compose.yml
-> volumes
sections).
To connect to the database running inside the docker container use TCP/IP connection localhost:3306 user:root, password:root (password specified in .env
)
.env
filelog
directorychmod 0777 web/lang/cache
./deployment/deploy.sh
web/game/mode9
is writable for everyone for error savingValidate deployed services:
docker stack services lords
- replicas should be 1/1, not 0/1docker exec -it $(docker ps -q -f name=lords_db) /database/bin/lords_db_update.sh
docker stack ps lords --no-trunc
docker service logs --tail="200" lords_ws
replace ws with service name