- Monorepo with turborepo
- Three JS
- Node JS based server
- Socket.io
- Docker
- Azure ACI
- Github Workflow
- Bun => Faster for nextjs, but doesn't support some web socket modules
This turborepo uses npm as a package manager. It includes the following packages/apps:
api
: a Fastify server with Socket.IOgames
: a Next.js appinterface
: utility interface shared bygames
andapi
applicationseslint-config-custom
:eslint
configurations (includeseslint-config-next
andeslint-config-prettier
)tsconfig
:tsconfig.json
s used throughout the monorepo
Each package/app is 100% TypeScript.
To build all apps and packages, run the following command:
cd party
yarn build
To develop all apps and packages, run the following command:
cd party
yarn dev
This repo is configured to be built with Docker, and Docker compose. To build all apps in this repo:
# Create a network, which allows containers to communicate
# with each other, by using their container name as a hostname
docker network create app_network
# Build prod using new BuildKit engine
DOCKER_BUILDKIT=1 docker-compose -f docker-compose.yml build --parallel
# Alternatively, build each app separately from root context
docker build -f apps/games/Dockerfile .
docker build -f apps/api/Dockerfile .
# Start prod in detached mode
docker-compose -f docker-compose.yml up -d
Open http://localhost:3000. Open http://localhost:8080.
To shutdown all running containers:
# Stop all running containers
docker kill $(docker ps -q) && docker rm $(docker ps -a -q)
https://learn.microsoft.com/en-us/azure/container-instances/tutorial-docker-compose
az login
az group create --name myResourceGroup --location eastus
az acr create --resource-group myResourceGroup --name ghoshanjega --sku Basic
az acr login --name ghoshanjega
DOCKER_BUILDKIT=1 docker-compose -f docker-compose.yml build --parallel
docker-compose push
docker login azure
docker context create aci partycontext
docker context use partycontext
docker-compose -f docker-compose.yml up -d
fly deploy --config fly.games.toml
fly deploy --config fly.api.toml