Automotivated.engine( ) is an search api for automotive inventory. It's build with Symfony and connects to Elasticsearch with a MySQL database for datastorage.
This API is build for Automotivated.vroom( ) and is out of the box compatible with eachother. How sweet!
Put on some nice Electro Swing and make sure you got the following applications installed:
<code like a pro>
Here is a little list off applications I use for development. Not required to run the application, but are always nice to have and will definitely make your life a little less frustrating
- PHPStorm
- BeardedSpice don't worry, nobody will hear the electro swing except you!
- Spectacle shortcuts to get the windows where you want them!
</code like a pro>
Hey Ho, Let's Go! (installation)
Open your favorite (fish || zsh) flavoured (oh-my-fish || oh-my-zsh) terminal (iterm) and go to your projects folder and clone this repo!
<code like a pro>
I'm using fish with oh-my-fish and my own feest theme. Install is super easy and can be done with one command:omf install https://github.com/FKobus/theme-feest
</code like a pro>
Start with cloning the project to your own development machine
git clone https://github.com/Automotivated/engine.gitGo to the root of your clone and install all dependencies
composer installWe assume you got Elasticsearch, MySQL, Apache2/Nginx installed. If not.. Please do before continuing.
Seems that on a mac somethings won't get setup correctly within the cache folder of Symfony. I'm working locally, if you're using Vagrant, this might not apply to you. Because of access to files the following situations can happen with updating with composer:
// Clearing the cache for the dev environment with debug
// true
[Symfony\Component\Filesystem\Exception\IOException]
Failed to remove file "/Users/itsame/Projects/Automotivated/engine/var/cache/de~/profiler/de/56/aa56de": .We need to setup the file permissions Symfony help. Go to your root and cleanup any existing cache files.
rm -rf var/cache/*
rm -rf var/logs/*
Next we need to determine the user of your webserver:
ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1
# OUTPUT:
_www /usr/sbin/httpd
# _www is the userFollowed by determing who you are.. isn't that the real question in life?
whoami
Now do the following twice (once for your webserver and once for yourself)
sudo chmod -R +a "<USER> allow delete,write,append,file_inherit,directory_inherit" var
Something like this:
sudo chmod -R +a "_www allow delete,write,append,file_inherit,directory_inherit" var
sudo chmod -R +a "itsame allow delete,write,append,file_inherit,directory_inherit" var
- The API will follow the rules of json:api
- It should return data under 50ms?? (let's try)
- Database fixtures
- Database Enums
- Migrations
http://obtao.com/blog/2014/02/indexing-and-simple-search-with-elasticsearch-and-symfony/