diff --git a/Controller/AdminController.php b/Controller/AdminController.php deleted file mode 100644 index 395421e..0000000 --- a/Controller/AdminController.php +++ /dev/null @@ -1,394 +0,0 @@ -entityManager = $entityManager; - $this->knpPaginator = $knpPaginator; - $this->openSsl = $openSsl; - $this->flashBag = $flashBag; - } - - /** - * @return string - */ - private function getShortBundle() - { - return strtr('Intaro\DeliveryModuleBundle', ['\\' => '']); - } - - /** - * @return string - */ - private function getNameService() - { - $bundle = explode('\\', 'Intaro\DeliveryModuleBundle'); - - return strtr(end($bundle), ['Bundle' => '']); - } - - /** - * @return Response - */ - public function listAction(Request $request) - { - $clientsQuery = $this->entityManager->createQuery(' - SELECT connection - FROM ' . $this->getConnectionClass() . ' connection - '); - - $pagination = $this->knpPaginator->paginate( - $clientsQuery, - $request->query->getInt('page', 1), - 20 - ); - - return $this->render( - $this->getShortBundle() . ':Connection:list.html.twig', - ['pagination' => $pagination, 'route' => $this->getRoute()] - ); - } - - /** - * @return Response - */ - public function newAction(Request $request) - { - $this->denyAccessUnlessGranted('ROLE_DEVELOPER'); - - $connectionClass = $this->getConnectionClass(); - $connection = new $connectionClass(); - $connection->setEncoder($this->openSsl); - $connectionTypeClass = 'Intaro\DeliveryModuleBundle\Form\ConnectionType'; - $form = $this->createForm($connectionTypeClass, $connection, [ - 'container' => $this->container, - 'is_admin' => true, - ]); - $form->handleRequest($request); - - if ($form->isSubmitted() && $form->isValid()) { - $connection->generateClientId(); - $this->actualizeWebhooks($connection); - $this->entityManager->persist($connection); - $this->entityManager->flush(); - - return $this->redirectToRoute($this->getRoute() . '_admin_edit', [ - 'connectionId' => $connection->getId(), - ]); - } - - return $this->render( - $this->getShortBundle() . ':Connection:edit.html.twig', - ['route' => $this->getRoute(), 'form' => $form->createView()] - ); - } - - /** - * @param string $connectionId - * - * @return Response - */ - public function editAction(Request $request, $connectionId) - { - $connection = $this->entityManager - ->getRepository($this->getConnectionClass()) - ->find($connectionId); - if (null === $connection) { - throw $this->createNotFoundException(); - } - - $connectionTypeClass = 'Intaro\DeliveryModuleBundle\Form\ConnectionType'; - $form = $this->createForm($connectionTypeClass, $connection, [ - 'container' => $this->container, - 'is_admin' => true, - ]); - $form->handleRequest($request); - - if ($form->isSubmitted() && $form->isValid()) { - $this->actualizeWebhooks($connection); - $this->entityManager->flush(); - - return $this->redirectToRoute($this->getRoute() . '_admin_edit', [ - 'connectionId' => $connection->getId(), - ]); - } - - return $this->render( - $this->getShortBundle() . ':Connection:edit.html.twig', - [ - 'route' => $this->getRoute(), - 'connection' => $connection, - 'form' => $form->createView(), - ] - ); - } - - /** - * @param string $connectionId - * - * @return Response - * - * @throws \Exception - */ - public function updateConfigurationAction(Request $request, $connectionId) - { - $this->denyAccessUnlessGranted('ROLE_DEVELOPER'); - - $api = $this->getDeliveryApi(); - - $connection = $this->entityManager - ->getRepository($this->getConnectionClass()) - ->find($connectionId); - - $api->setConnection($connection); - $result = $api->updateConfiguration(); - - if (isset($result['success']) && $result['success']) { - $this->flashBag->add('notice', 'ChangesWereSaved'); - } else { - $this->flashBag->add('error', 'ChangesWereNotSaved'); - } - - return $this->redirectToRoute($this->getRoute() . '_admin_edit', [ - 'connectionId' => $connection->getId(), - ]); - } - - /** - * @return Response - */ - public function parcelListAction(Request $request) - { - $parcelsQuery = $this->entityManager->createQuery(' - SELECT parcel - FROM ' . $this->getParcelClass() . ' parcel - '); - - $pagination = $this->knpPaginator->paginate( - $parcelsQuery, - $request->query->getInt('page', 1), - 20 - ); - - return $this->render( - $this->getShortBundle() . ':Parcel:list.html.twig', - ['route' => $this->getRoute(), 'pagination' => $pagination] - ); - } - - /** - * @return Response - */ - public function parcelNewAction(Request $request) - { - $this->denyAccessUnlessGranted('ROLE_DEVELOPER'); - - $parcelClass = $this->getParcelClass(); - $parcel = new $parcelClass(); - $parcelTypeClass = 'Intaro\DeliveryModuleBundle\Form\ParcelType'; - $form = $this->createForm($parcelTypeClass, $parcel, [ - 'connection_class' => $this->getConnectionClass(), - ]); - - $form->handleRequest($request); - - if ($form->isSubmitted() && $form->isValid()) { - $this->entityManager->persist($parcel); - $this->entityManager->flush(); - - return $this->redirectToRoute($this->getRoute() . '_admin_parcel_list'); - } - - return $this->render( - $this->getShortBundle() . ':Parcel:edit.html.twig', - ['form' => $form->createView(), 'parcel' => $parcel] - ); - } - - /** - * @param string $parcelId - * - * @return Response - */ - public function parcelEditAction(Request $request, $parcelId) - { - $parcel = $this->entityManager - ->getRepository($this->getParcelClass()) - ->find(['id' => $parcelId]); - - $parcelTypeClass = 'Intaro\DeliveryModuleBundle\Form\ParcelType'; - $form = $this->createForm($parcelTypeClass, $parcel, [ - 'connection_class' => $this->getConnectionClass(), - ]); - - $form->handleRequest($request); - - if ($form->isSubmitted() && $form->isValid()) { - $this->entityManager->flush(); - - return $this->redirectToRoute($this->getRoute() . '_admin_parcel_list'); - } - - return $this->render( - $this->getShortBundle() . ':Parcel:edit.html.twig', - ['form' => $form->createView(), 'parcel' => $parcel] - ); - } - - /** - * @return Response - * - * @throws \Exception - */ - public function connectAction(Request $request) - { - $api = $this->getDeliveryApi(); - - $referer = $request->headers->get('referer'); - $account = $request->query->get('account'); - $accountUrl = null; - if (!empty($account)) { - $accountUrl = null === parse_url($account, PHP_URL_HOST) - ? null : 'https://' . parse_url($account, PHP_URL_HOST); - } - - if ( - !empty($request->request->get('clientId')) - || !empty($request->attributes->get('clientId')) - ) { - if (!empty($request->request->get('clientId'))) { - $clientId = $request->request->get('clientId'); - } else { - $clientId = $request->attributes->get('clientId'); - } - - $connection = $this->entityManager - ->getRepository($this->getConnectionClass()) - ->findOneBy([ - 'clientId' => $clientId, - ]); - $accountUrl = $connection->getCrmUrl(); - } else { - $class = $this->getConnectionClass(); - $connection = new $class(); - $connection - ->setLanguage($request->getLocale()) - ->setEncoder($this->openSsl); - } - - $connectionTypeClass = 'Intaro\DeliveryModuleBundle\Form\ConnectionType'; - $form = $this->createForm($connectionTypeClass, $connection, [ - 'container' => $this->container, - 'is_admin' => false, - ]); - $form->handleRequest($request); - - if ($form->isSubmitted() && $form->isValid()) { - $connectionIsCreated = true; - if (empty($connection->getClientId())) { - $connection->generateClientId(); - $connectionIsCreated = false; - } - - $api->setConnection($connection); - $this->actualizeWebhooks($connection); - $result = $api->updateConfiguration(); - if (isset($result['success']) && $result['success']) { - if (!$connectionIsCreated) { - $this->entityManager->persist($connection); - } - $this->entityManager->flush(); - - return $this->redirect($connection->getCrmUrl() . '/admin/integration/list'); - } else { - $srcLogo = $request->getUriForPath( - '/bundles/delivery' - . strtolower($this->getNameService()) - . '/images/' - . strtolower($this->getNameService()) - . '.svg' - ); - - return $this->render( - 'DeliveryCoreBundle:Connection:configure_error.html.twig', - [ - 'referer' => $referer, - 'errors' => $result, - 'title_delivery' => $this->getNameService(), - 'src_logo_delivery' => $srcLogo, - ] - ); - } - } - - return $this->render( - $this->getShortBundle() . ':Connection:configure.html.twig', - [ - 'route' => $this->getRoute(), - 'form' => $form->createView(), - 'account' => $accountUrl, - ] - ); - } - - /** - * Actualize webhooks. - */ - protected function actualizeWebhooks(Connection $connection) - { - } -} diff --git a/EventListener/SerializeListener.php b/EventListener/SerializeListener.php deleted file mode 100644 index 3b4b04a..0000000 --- a/EventListener/SerializeListener.php +++ /dev/null @@ -1,27 +0,0 @@ - Events::PRE_SERIALIZE, 'method' => 'onPreSerialize', 'class' => ResponseResult::class], - ]; - } - - public function onPreSerialize(PreSerializeEvent $event) - { - if (is_object($event->getObject())) { - $event->setType(get_class($event->getObject())); - } else { - $event->setType('string'); - } - } -} diff --git a/Form/ConfigureEditType.php b/Form/ConfigureEditType.php deleted file mode 100644 index a380676..0000000 --- a/Form/ConfigureEditType.php +++ /dev/null @@ -1,31 +0,0 @@ -add('connectionId', null, [ - 'label' => 'label.connectionId', - 'required' => true, - 'attr' => [ - 'placeholder' => 'label.connectionId', - ], - ]) - ->add('crmKey', null, [ - 'label' => 'label.crmKey', - 'required' => true, - 'attr' => [ - 'placeholder' => 'label.crmKey', - ], - ]); - } -} diff --git a/Form/ConnectionType.php b/Form/ConnectionType.php deleted file mode 100644 index f0ddfee..0000000 --- a/Form/ConnectionType.php +++ /dev/null @@ -1,72 +0,0 @@ -add('crmUrl', TextType::class, [ - 'label' => 'label.crmUrl', - 'required' => true, - 'attr' => [ - 'placeholder' => 'label.crmUrl', - 'pattern' => '^(https?:\/\/)?([\da-z0-9\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$', - ], - 'translation_domain' => 'messages', - ]) - ->add('crmKey', TextType::class, [ - 'label' => 'label.crmKey', - 'required' => true, - 'attr' => [ - 'placeholder' => 'label.crmKey', - ], - 'translation_domain' => 'messages', - ]) - ->add('isActive', CheckboxType::class, [ - 'label' => 'label.isActive', - 'required' => false, - 'translation_domain' => 'messages', - ]) - ->add('language', ChoiceType::class, [ - 'label' => 'label.language', - 'choices' => [ - 'RU' => 'ru', - 'EN' => 'en', - 'ES' => 'es', - ], - 'required' => true, - 'translation_domain' => 'messages', - ]) - ->add('isFreeze', CheckboxType::class, [ - 'label' => 'label.isFreeze', - 'required' => false, - 'translation_domain' => 'messages', - ]); - - if ($options['is_admin']) { - $builder - ->add('debug', CheckboxType::class, [ - 'label' => 'label.debug', - 'required' => false, - 'translation_domain' => 'messages', - ]); - } - } - - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setRequired(['container', 'is_admin']); - } -} diff --git a/Form/ParcelType.php b/Form/ParcelType.php deleted file mode 100644 index d2f256c..0000000 --- a/Form/ParcelType.php +++ /dev/null @@ -1,63 +0,0 @@ -add( - 'connection', - EntityType::class, - [ - 'class' => $options['connection_class'], - 'label' => 'label.connection', - 'translation_domain' => 'messages', - ] - ) - ->add( - 'orderId', - TextType::class, - [ - 'label' => 'label.orderId', - 'translation_domain' => 'messages', - ] - ) - ->add( - 'trackId', - TextType::class, - [ - 'label' => 'label.trackId', - 'translation_domain' => 'messages', - ] - ) - ->add( - 'isClosed', - CheckboxType::class, - [ - 'required' => false, - 'label' => 'label.isClosed', - 'translation_domain' => 'messages', - ] - ); - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setRequired(['connection_class']); - } -} diff --git a/Resources/views/Connection/configure.html.twig b/Resources/views/Connection/configure.html.twig deleted file mode 100644 index 8d84911..0000000 --- a/Resources/views/Connection/configure.html.twig +++ /dev/null @@ -1,68 +0,0 @@ -{% form_theme form 'DeliveryCoreBundle:Form:configure.html.twig' %} - - - - - - - {% block title %}{% endblock %} - - - - - - -
-
-
-
- {% block logo %}{% endblock %} -
-
-
-
-
-
- {% block form %} -
- {{ form_errors(form) }} -
- -
- {{ form_start(form) }} - - {% block form_delivery %} - {% endblock %} - -
- {{ 'header.configureConnection'|trans }} - {{ form_widget(form.crmUrl, {'attr': {'value': account}}) }} - {{ form_errors(form.crmUrl) }} - - {{ form_widget(form.crmKey) }} - {{ form_errors(form.crmKey) }} - - {{ form_widget(form.language) }} - {{ form_errors(form.language) }} -
- - {% block form_delivery_after %} - {% endblock %} - -
- {{ form_rest(form) }} -
- - - {{ form_end(form) }} - {% endblock %} - -
-
- -
- - - diff --git a/Resources/views/Connection/configure_error.html.twig b/Resources/views/Connection/configure_error.html.twig deleted file mode 100644 index 0440200..0000000 --- a/Resources/views/Connection/configure_error.html.twig +++ /dev/null @@ -1,13 +0,0 @@ -{% extends 'CoreAutomateBundle:Layout:connect.html.twig' %} - -{% block title %} - {{ 'header.serviceConnect'|trans({'%delivery%': title_delivery})|raw }} -{% endblock %} - -{% block logo %} - {{ title_delivery }} -{% endblock %} - -{% block form %} - {{ 'error.connect.failed'|trans({'%delivery%': title_delivery, '%href%': referer})|raw }} -{% endblock %} diff --git a/Resources/views/Connection/edit.html.twig b/Resources/views/Connection/edit.html.twig deleted file mode 100644 index 3b1889e..0000000 --- a/Resources/views/Connection/edit.html.twig +++ /dev/null @@ -1,60 +0,0 @@ -{% extends 'CoreOmegaBundle:Layout:base.html.twig' %} -{% form_theme form 'DeliveryCoreBundle:Form:admin.html.twig' %} - -{% block content %} -
-

- {% if connection is defined %} - {{ 'header.adminConnectionEdit'|trans({'%uid%': ''~connection.crmUrl~''})|raw }} - {% else %} - {{ 'header.adminConnectionCreate'|trans()|raw }} - {% endif %} -

-
- -
-
- {{ form_start(form) }} - {{ form_errors(form) }} - -
- {{ form_row(form.crmUrl) }} - {{ form_row(form.crmKey) }} - - {{ form_row(form.isActive) }} - - {% if form.language is defined %} - {{ form_row(form.language) }} - {% endif %} - - {{ form_row(form.isFreeze) }} -
- - {% block form_appendix %} - {% endblock %} - -
- {{ form_row(form.debug) }} -
- -
-
- -
- {% if is_granted('ROLE_DEVELOPER') %} - {% if connection is defined %} - - {% endif %} - {% endif %} -
- - {{ form_end(form) }} -
- -
-
-{% endblock %} diff --git a/Resources/views/Connection/list.html.twig b/Resources/views/Connection/list.html.twig deleted file mode 100644 index dde22df..0000000 --- a/Resources/views/Connection/list.html.twig +++ /dev/null @@ -1,61 +0,0 @@ -{% extends 'CoreOmegaBundle:Layout:base.html.twig' %} - -{% block content %} -
-

{{ 'header.listConnection'|trans()|raw }}

-
- -
-
- {% if is_granted('ROLE_DEVELOPER') %} - - {{ 'button.add'|trans()|raw }} - - {% endif %} - - {{ 'button.listTracking'|trans()|raw }} - -
- - - - - - - - {% for client in pagination %} - - - - - - {% endfor %} -
{{ 'label.id'|trans()|raw }}{{ 'label.crmUrl'|trans()|raw }}{{ 'label.isActive'|trans()|raw }}
- {{ client.clientId }} - - {% if client.crmUrl is not empty %} - - {{ client.crmUrl }} - - {% endif %} - - {% if client.isActive %} - - {% else %} - - {% endif %} -
- -
-
- - {{ pagination.getTotalItemCount }} {{ 'pagination.items.name'|trans()|raw }} - -
-
- {{ knp_pagination_render(pagination) }} -
-
-
-
-{% endblock %} diff --git a/Resources/views/Form/admin.html.twig b/Resources/views/Form/admin.html.twig deleted file mode 100644 index 5e0b0f2..0000000 --- a/Resources/views/Form/admin.html.twig +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "form_div_layout.html.twig" %} - -{% block form_row %} -{% spaceless %} -
- {{ form_label(form, null, {'label_attr' : {'class': 'label-common'}}) }} - {{ form_errors(form) }} - - {% if not attr or not attr.class|default(null) %} - {% set attr = attr|default({})|merge({ - 'class': 'input-field', - 'style': 'max-width: 320px;' - }) %} - {% endif %} - {{ form_widget(form, { 'attr': attr }) }} -
-{% endspaceless %} -{% endblock form_row %} \ No newline at end of file diff --git a/Resources/views/Form/configure.html.twig b/Resources/views/Form/configure.html.twig deleted file mode 100644 index 60eb358..0000000 --- a/Resources/views/Form/configure.html.twig +++ /dev/null @@ -1,13 +0,0 @@ -{% extends "form_div_layout.html.twig" %} - -{% block form_errors %} - {% spaceless %} - {% if errors|length > 0 %} - {% for error in errors %} -
- {{ error.message }} -
- {% endfor %} - {% endif %} - {% endspaceless %} -{% endblock form_errors %} \ No newline at end of file diff --git a/Resources/views/Parcel/edit.html.twig b/Resources/views/Parcel/edit.html.twig deleted file mode 100644 index 00ef4cc..0000000 --- a/Resources/views/Parcel/edit.html.twig +++ /dev/null @@ -1,61 +0,0 @@ -{% extends 'CoreOmegaBundle:Layout:base.html.twig' %} - -{% block content %} -
-

- {% if parcel.id is not empty %} - {{ 'header.adminParcelEdit' |trans({'%trackId%': parcel.trackId})|raw }} - {% else %} - {{ 'header.adminParcelCreate' |trans()|raw }} - {% endif %} -

-
- -
-
- {{ form_start(form) }} - {{ form_errors(form) }} - -
-
- {{ form_label(form.connection, null, {'label_attr' : {'class': 'label-common'}}) }} - {{ form_errors(form.connection) }} - {{ form_widget(form.connection, {'attr': {'class': 'input-field', 'style': 'width: 320px;'}}) }} -
- -
- {{ form_label(form.orderId, null, {'label_attr' : {'class': 'label-common'}}) }} - {{ form_errors(form.orderId) }} - {{ form_widget(form.orderId, {'attr': {'class': 'input-field', 'style': 'width: 320px;'}}) }} -
-
- -
-
- {{ form_label(form.trackId, null, {'label_attr' : {'class': 'label-common'}}) }} - {{ form_errors(form.trackId) }} - {{ form_widget(form.trackId, {'attr': {'class': 'input-field', 'style': 'width: 320px;'}}) }} -
- -
- {{ form_label(form.isClosed, null, {'label_attr' : {'class': 'label-common'}}) }} - {{ form_errors(form.isClosed) }} - {{ form_widget(form.isClosed) }} -
-
- - {% block form_appendix %} - {% endblock %} - -
-
- -
-
- - {{ form_end(form) }} -
- -
-
-{% endblock%} diff --git a/Resources/views/Parcel/list.html.twig b/Resources/views/Parcel/list.html.twig deleted file mode 100644 index 0eb062a..0000000 --- a/Resources/views/Parcel/list.html.twig +++ /dev/null @@ -1,60 +0,0 @@ -{% extends 'CoreOmegaBundle:Layout:base.html.twig' %} - -{% block content %} -
-

{{ 'header.listConnection'|trans()|raw }}

-
- -
-
- - {{ 'button.listConnection'|trans()|raw }} - - {% if is_granted('ROLE_DEVELOPER') %} - - {{ 'button.addTracking'|trans()|raw }} - - {% endif %} -
- - - - - - - - {% for track in pagination %} - - - - - - - {% endfor %} -
{{ 'label.trackId'|trans()|raw }}{{ 'label.orderId'|trans()|raw }}{{ 'label.connection'|trans()|raw }}{{ 'label.isClosed'|trans()|raw }}
- {{ track.trackId}} - - {{ track.orderId}} - - {{ track.clientId}} - - {% if track.isClosed %} - - {% else %} - - {% endif %} -
- -
-
- - {{ pagination.getTotalItemCount }} {{ 'pagination.items.name'|trans()|raw }} - -
-
- {{ knp_pagination_render(pagination) }} -
-
-
-
-{% endblock%} diff --git a/Service/ModuleManager.php b/Service/ModuleManager.php index 67e301c..d20f512 100644 --- a/Service/ModuleManager.php +++ b/Service/ModuleManager.php @@ -2,7 +2,6 @@ namespace RetailCrm\DeliveryModuleBundle\Service; -use GuzzleHttp\Handler\MockHandler; use JMS\Serializer\SerializationContext; use JMS\Serializer\SerializerInterface; use Psr\Log\LoggerInterface; @@ -47,11 +46,6 @@ abstract class ModuleManager implements ModuleManagerInterface */ protected $account; - /** - * @var MockHandler - */ - protected $mockHandler; - /** * @var TranslatorInterface */ diff --git a/Service/RetailCrmClientFactory.php b/Service/RetailCrmClientFactory.php index 9726641..472fd8d 100644 --- a/Service/RetailCrmClientFactory.php +++ b/Service/RetailCrmClientFactory.php @@ -2,9 +2,9 @@ namespace RetailCrm\DeliveryModuleBundle\Service; -use App\Entity\Account; use Psr\Log\LoggerInterface; use RetailCrm\ApiClient; +use RetailCrm\DeliveryModuleBundle\Model\Entity\Account; class RetailCrmClientFactory implements RetailCrmClientFactoryInterface { diff --git a/Service/RetailCrmClientFactoryInterface.php b/Service/RetailCrmClientFactoryInterface.php index c6cb0cd..8c0d156 100644 --- a/Service/RetailCrmClientFactoryInterface.php +++ b/Service/RetailCrmClientFactoryInterface.php @@ -2,9 +2,9 @@ namespace RetailCrm\DeliveryModuleBundle\Service; -use App\Entity\Account; use Psr\Log\LoggerInterface; use RetailCrm\ApiClient; +use RetailCrm\DeliveryModuleBundle\Model\Entity\Account; interface RetailCrmClientFactoryInterface { diff --git a/docker-compose-test.yml b/docker-compose-test.yml deleted file mode 100644 index 7a2bf2a..0000000 --- a/docker-compose-test.yml +++ /dev/null @@ -1,28 +0,0 @@ -version: '2.1' -services: - automate_app: - image: "gwinn/php:7.1" - working_dir: /automate - user: ${UID:-1000}:${GID:-1000} - volumes: - - ./:/automate - links: - - "automate_db:automate_db" - - "automate_cache:automate_cache" - - "automate_queue:automate_queue" - automate_db: - image: "postgres:9.5" - ports: - - ${POSTGRES_ADDRESS:-127.0.0.1:5432}:5432 - environment: - - POSTGRES_PASSWORD=automate - - POSTGRES_USER=automate - - POSTGRES_DB=automate - automate_cache: - image: "redis:alpine" - ports: - - "6379:6379" - automate_queue: - image: "schickling/beanstalkd:latest" - ports: - - "11300:11300" diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 57478ac..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,46 +0,0 @@ -version: '2.1' -services: - automate_app: - image: "gwinn/php:7.1" - ports: - - "80:8080" - working_dir: /automate - user: ${UID:-1000}:${GID:-1000} - volumes: - - ./:/automate - depends_on: - - automate_db - - automate_db_test - - automate_cache - - automate_queue - links: - - "automate_db:automate_db" - - "automate_db_test:automate_db_test" - - "automate_cache:automate_cache" - - "automate_queue:automate_queue" - command: make run - automate_db: - image: "postgres:9.5" - ports: - - ${POSTGRES_ADDRESS:-127.0.0.1:5432}:5432 - environment: - - POSTGRES_PASSWORD=automate - - POSTGRES_USER=automate - - POSTGRES_DB=automate - automate_db_test: - image: "postgres:9.5" - ports: - - ${POSTGRES_ADDRESS:-127.0.0.1:5434}:5434 - environment: - - PGPORT=5434 - - POSTGRES_PASSWORD=automate - - POSTGRES_USER=automate - - POSTGRES_DB=automate - automate_cache: - image: "redis:alpine" - ports: - - "6379:6379" - automate_queue: - image: "schickling/beanstalkd:latest" - ports: - - "11300:11300"