Skip to content

Интернет-магазин пельменей

Notifications You must be signed in to change notification settings

MaxWanted/momo-store

Repository files navigation

Momo Store aka Пельменная №2

image

- Site is currently unavailable! -

www.momostore.ru

Gitlab repositories

Backend: Golang
Frontend: HTML + JavaScript
Current release: 1.0.0

Application


Frontend

npm install
NODE_ENV=production VUE_APP_API_URL=http://localhost:8081 npm run serve

Backend

go run ./cmd/api
go test -v ./... 

Docker

You can run app in Docker without CI/CD pipeline.

git clone https://gitlab.praktikum-services.ru/m.a.derkach.cloud/momo-store.git
cd momo-store
docker-compose -f docker-compose-standalone.yml up -d --build

open http://localhost:8000

Infrastructure


git clone https://gitlab.praktikum-services.ru/m.a.derkach.cloud/momo-infra.git
cd momo-infra

You can use Terraform to provision a Kubernetes cluster in YandexCloud. Before you need to install YC-CLI

export YC_TOKEN=`yc iam create-token`
cd terraform/k8s-cluster
terraform apply main.tf  -var "yc_token=${YC_TOKEN}"

Deployment in cluster

kubectl

cd kubernetes
kubectl apply -f backend
cd kubernetes
kubectl apply -f frontend

helm

cd helm-charts
helm upgrade --install momo-store  momo-store/  --atomic

Prometheus

You can configure rules for alerting helm-charts/prometheus/rules/momo-store.yaml

cd helm-charts 
helm install prometheus prometheus/ --atomic
kubectl port-forward pods/<"prometheus pod's name"> 8081:9090 -n default

open dashboard http://localhost:8081

Grafana

cd helm-charts 
helm install grafana grafana/ --atomic
kubectl port-forward pods/<"grafana pod's name"> 8080:3000 -n default

open dashboard http://localhost:8080

Alertmanager

You can configure notification to Slack helm install alermanager alertmanager/ --set slack_hook_url="https://hooks.slack.com/services/..."

cd helm-charts 
helm install alertmanager alertmanager/ --atomic

Developing


There are 2 branch - main and develop.

git checkout develop
git merge --no-ff myfeature
git branch -d myfeature
git push origin develop

Git flow

Helm versioning
Change code then change version in main Chart.yaml (version: x.y.z), commit and push

Given a version number MAJOR.MINOR.PATCH, increment the:
MAJOR version when you make incompatible API changes
MINOR version when you add functionality in a backwards compatible manner
PATCH version when you make backwards compatible bug fixes
https://semver.org

About

Интернет-магазин пельменей

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published