Git Product home page Git Product logo

highlite2-sylius's Introduction

Highlite Spb

Highlite Spb is a show equipment store. It is a eCommerce project, consisting of following parts:

Highlite2-Sylius

Highlite2-sylius is based on Sylius Standard Edition.

Project structure

  • ci/ release and deploy settings;
  • dev/ local development environment settings;
  • docs/ documentation files;
  • sylius/ Sylius Standard Edition.

Local Development

Requirements:

In order to run highlite2-sylius locally you need to have docker and docker-compose installed.

Commands:

  • make dev-build Builds local environment from scratch. You must use this command when you start local environment for the first time or when you want to fully recreate it.
  • make dev-restart Rebuilds php-fpm, nginx and sftp containers. Keeps untouched the database and media files.
  • make dev-start Starts the environment after it had been stopped by make dev-stop command.
  • make dev-stop Stops local environment. You can easily start it again with make dev-start command.
  • make dev-clean Totally removes local environment but keeps untouched composer cache volume.
  • make dev-bash-node Runs bash in a container with node and yarn installed, with mounted codebase volume and under www-data user.
  • make dev-bash-php Runs bash in a container with php and composer installed, with mounted codebase volume and under www-data user.

Project codebase from sylius folder is placed in a volume. All services that need to have access to the codebase mount project folder to that volume. In order to develop locally and to update your code in a real time there is a sftp container that also mounts the codebase volume. You can setup automatic deployment using following credentials:

  • hostname localhost
  • port 2222
  • user dev
  • password dev

Why not bind mounting application directory?

Sylius has a lot of dependencies and as a result vendor folder is very large. Docker has a performance issue with large directories that are bind-mounted with osxfs. From official documentation:

There are a number of issues with the performance of directories bind-mounted with osxfs. 
In particular, writes of small blocks, and traversals of large directories are currently slow. 
Additionally, containers that perform large numbers of directory operations, such as repeated 
scans of large directory trees, may suffer from poor performance. Applications that behave in 
this way include:

- rake
- ember build
- Symfony
- Magento
- Zend Framework
- PHP applications that use Composer to install dependencies in a vendor folder

As a work-around for this behavior, you can put vendor or third-party library directories in 
Docker volumes, perform temporary file system operations outside of osxfs mounts, and use 
third-party tools like Unison or rsync to synchronize between container directories and 
bind-mounted directories. We are actively working on osxfs performance using a number of 
different techniques. To learn more, see the topic on Performance issues, solutions, and roadmap.

More related links:

Solution: there were several problems with changing project structure and moving vendor folder outside. So, it was decided to keep codebase in a volume and to have access to the code through sftp.

PHPStorm deployment settings example:

Connection

Deployment connection settings

Mappings

Deployment mappings settings

highlite2-sylius's People

Contributors

oliosinter avatar

Stargazers

 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.