Coder Social home page Coder Social logo

symfony-crm's Introduction

Api Starter Kit

Starter kit for API with Symfony, Doctrine, Maker Bundle, Migrations Bundle, Api-Platform and JWT-auth.

Kit has also already created User entity with all crud routes

Kit has 3 docker containers: php, nginx and mysql

poster

Installation

Download the project
composer create-project kadirov/api-starter-kit --ignore-platform-reqs --no-scripts

Go to the project directory
cd api-starter-kit

Run docker containers
docker-compose up -d

Install composer scripts:
docker-compose exec php composer install

To install project run command:
docker-compose exec php bin/console ask:install

Done! You can open http://localhost:8507/api via browser. By the way, you can change this port by changing DOCKER_NGINX_PORT variable in .env file.

Docker

For enter to php container run docker-compose exec php bash

For enter to mysql container run docker-compose exec mysql bash

For enter to nginx container run docker-compose exec nginx bash

You can change containers prefix by changing DOCKER_PROJECT_NAME variable in .env file.

Also, you can change public ports of nginx and mysql by changing DOCKER_NGINX_PORT and DOCKER_DATABASE_PORT

Database allows connections only from localhost. Because of this when you use the project on production and want to connect to database from your computer you should connect via ssh bridge.

Cron

You can use docker/php/cron-file for cron jobs. After you must re-build php container by running command:
docker-compose up -d --build

Swagger

You can change project name and description on swagger by editing file config/packages/api_platform.yaml

Git Hook

If you don't use any deploying system you can do
cp docker/other-files/git/hooks/post-merge .git/hooks

In this way git always executes command bin/console ask:deploy. You can change this command in the file src/Command/AskDeployCommand.php. This command will install requirements via composer, clear caches, change owner of ./var and ./public/media folders to www-data, will run migrations.

JWT keys

For use Json Web Token system you must create private and public keys. They are have already created when you install project. You can re-create them with:

bin/console ask:generate:jwtKeys

symfony-crm's People

Contributors

azizbek-tursunov avatar

Watchers

 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.