Snake with optional vim navigation. Visit playsnake.no to play!
graph TD
A(<b>Front-end</b><br/>Snake implemented in rust/wasm<br/>Deployed as Azure static webapp<br/>https://www.playsnake.no)-->B
B(<b>Highscore API</b><br/>REST API to manage highscores<br/>Deployed as Azure Container App<br/>https://highscores.playsnake.no)-->C(Mongo DB Database)
D(<b>Highscore Cleanup Job</b><br/>Periodically deletes stale highscores<br/>Deployed as Azure Container App Job)-->C
All the cloud infra is Infrastructure-as-Code managed by Terraform.
The highscores API is documented with OpenApi. Swagger UI |
json | yaml.
Run all services with docker compose, from the root folder in the repository.
docker compose up -d --build
Requires enabling buildkit, but this is enabled by default in newer versions of docker desktop, so you're probably all set 😄
Open up front-end at localhost:8080. The back-end is available at localhost:3000.
To stop all services and remove their containers:
docker compose down
docker and compose (incuded in Docker Desktop)
Query the ContainerAppConsoleLogs_CL
and ContainerAppSystemLogs_CL
tables
to find pod logs and system logs.
The backend service(s) are set up to collect logs using Open Telemetry. Currently (July, 2023) the open telemetry data is not exported anywhere, so it is hard to visualize this data. It is printed to the console (see above for finding console logs in application insights). //TODO: Make this work smoothly 😄