Merge code from this tutorial to serverless containers (Yandex Cloud).
Tic Tac Toe game, powered by Svelte and C Boost.Beast.
Clone the project:
git clone https://github.com/iRoboco/ttt5.git
cd ttt5
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
(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