MultiPlayerLobbyGame is Lobby service for online games.
- Register User
- Join Lobbies
- Can be Clustered
- C#/NET
- ASP.NET
- Redis
- Docker
Before running the application, ensure you have the following installed:
Follow these steps to set up and run the application:
- Clone the Repository:
git clone https://github.com/harpm/MultiPlayerLobbyGame.git cd Src
- Build and Run the Application: Use Docker Compose to build and run the application along with the Redis instance:
docker-compose up --build
This will:
- Build the MultiPlayerLobbyGame.API Docker image.
- Start a Redis container.
- Start 3 instances of the MultiPlayerLobbyGame.API application, all connected to the same Redis instance.
- Scaling the Application: If you want to run more instances of the application, you can scale the service using the --scale flag:
docker-compose up --build --scale multiplayerlobbygame-api=5
- Access the Application:
Once the containers are running, you can access the application at:
(Replace 80 with the port number if you've customized it in the docker-compose.yml file.)
http://localhost:80
- Stopping the Application:
To stop the application and all running containers, use:
docker-compose down
- Redis Connection: The application connects to Redis using the RedisConnection environment variable, which is set to redis:6379 in the docker-compose.yml file.
- Environment Variables: You can modify the environment variables in the docker-compose.yml file to customize the application behavior.