Giter Club home page Giter Club logo

devops-git.svn.mercurial-sf_test's Introduction

SemBlog

pipeline status coverage report

Create an AWESOME blog!

##How to run project:

  1. make docker-pull will pull all needed images
  2. make up run all containers
  3. make enable-nfs setup native NFS for Docker
  4. make composer-install install all needed packages
  5. make generate-env will generate base .env file
  6. make db-migrate run migrations
  7. Follow the link localhost/api/documentation to use interactive api doc

API Doc

RC page - https://semblog-rc.rc-k2.semrush.net/api/documentation

PROD page - https://semblog-prod.k1.semrush.net/api/documentation

PhpMetrics

https://flame-team.pages.semrush.net/semblog/semblog/master/metrics/index.html

And next time xdebuk will do "knock-knock" to used ip address.

Developer tools

Developer commands (from Makefile)

Running project

Command Description
make docker-pull pull all needed images for running project
make up up containers
make up up-blackfire run containers with blackfire
make down down containers
make generate-env generate base .env file
make enable-nfs setup native NFS for Docker

XDebug

Command Description
make up-xdebug up containers with XDebug
make set-xdebug-ip setup XDebug ip
make set-xdebug-mac-ip setup XDebug ip for Mac
make docker-xdebug-build build php-core-xdebug and php-fpm-xdebug

Database

Command Description
make db-migrate run migrations
make db-migrate-fresh drop all tables and re-run all migrations
make db-fresh drop all tables, re-run all migrations and seed the database with records
make up-test-db build test-mysql
make seed-feature re-run all migrations and seed records with class=FeatureMainSeeder

Building images

Command Description
make rebuild-images rebuild images (php-core, php-fpm, php-composer, nginx)
make push-images push images (php-core, php-fpm, php-composer, nginx)
make build-files build files (copy different files with --chown=1000:1000 into image)
make push-files push files
make build-core build php-core

Elasticsearch

Command Description
make build-el build elasticsearch
make up-elastic up elasticsearch

Redis

Command Description
make redis-cli run redis-cli

Composer

Command Description
make composer open bash php-composer
make composer-install run command composer install
make composer-da run command composer dump-autoload

Fixing code

Command Description
make larastan check php by larastan
make codestyle-fix fix codestyle for the whole project
make generate-models-doc run command php artisan ide-helper:models (after changing eloquent models you can regenerate phpdoc for models)
make generate-swaggger run generating swaggger
make fix-everything run generate-models-doc, codestyle-fix and larastan

Log and Bash

Command Description
make log show logs
make bash run bash in working environment
make bash-xdebug open bash php-core-xdebug

Install semver

Command Description
make install-semver install semver

Building all images in Gitlab

Command Description
make build-feature build all images in Gitlab (docker-rc-'hash') in feature branch
make build-rc pull master and build all images in Gitlab (docker-rc-‘hash’) for rc stage
make build-prod pull master and build all images in Gitlab (docker-prod-‘hash’) for prod stage

Other

Command Description
make run-horizon run command php artisan horizon

Useful kubectl commands

Delete all pods with errors

kubectl get pods | grep Error | cut -d' ' -f 1 | xargs kubectl delete pod

Profile with Blackfire

Run containers with blackfire and without xdebug: make up up-blackfire

Then run url for profiling: docker exec -it semblog_blackfire_1 blackfire curl http://nginx/blog/api/v3/categories

devops-git.svn.mercurial-sf_test's People

Contributors

fedchishina avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.