Skip to content

iRoboco/ttt5

 
 

Repository files navigation

Merge code from this tutorial to serverless containers (Yandex Cloud).
Tic Tac Toe game, powered by Svelte and C Boost.Beast.

Get started

Clone the project:

git clone https://github.com/iRoboco/ttt5.git
cd ttt5

Build containers and push it in Yandex.Registry:

In the following commands <registry_ID> must be replaced with the ID value of your Yandex Cloud Container Registry

  • Build the backebnd
cd beast
docker build -t ttt5-backend:latest .
docker tag ttt5-backend cr.yandex/<registry_ID>/ttt5-backend
docker push cr.yandex/<registry_ID>/ttt5-backend
  • Build the frontend:
cd front
docker build -t ttt5-frontend:latest .
docker tag ttt5-frontend cr.yandex/<registry_ID>/ttt5-frontend
docker push cr.yandex/<registry_ID>/ttt5-backend
  • Check builded images:
docker images

Result in terminal

REPOSITORY                              TAG       IMAGE ID       CREATED             SIZE
cr.yandex/<registry_ID>/ttt5-backend    latest    56ac4c64e47b   About an hour ago   79.4MB
ttt5-backend                            latest    56ac4c64e47b   About an hour ago   79.4MB
cr.yandex/<registry_ID>/ttt5-frontend   latest    7eab5a1d045e   About an hour ago   46MB
ttt5-frontend                           latest    7eab5a1d045e   About an hour ago   46MB

Run containers locally

(the port number is hardcoded in Dockerfile and nginx.conf)

  • Backend:
docker run -p 8080:8080 ttt5-backend:latest
  • Frontend:
docker run -p 8080:8080 ttt5-frontend:latest

Releases

No releases published

Packages

No packages published

Languages

  • C 67.4%
  • Makefile 9.8%
  • JavaScript 6.9%
  • Svelte 6.9%
  • Dockerfile 4.6%
  • HTML 1.5%
  • Other 2.9%