소스 검색

Finished the project with Dockerfile

Jean Sumara 5 년 전
부모
커밋
11aca7b7af
5개의 변경된 파일24개의 추가작업 그리고 10개의 파일을 삭제
  1. 11 0
      Dockerfile
  2. 2 1
      composer.json
  3. 9 7
      composer.lock
  4. 1 1
      src/App/Factory/S3Factory.php
  5. 1 1
      src/App/Listener/ExportListener.php

+ 11 - 0
Dockerfile

@@ -0,0 +1,11 @@
+FROM bitnami/php-fpm:latest
+
+ADD . /opt/export
+
+WORKDIR /opt/export
+
+RUN composer install --no-scripts --no-interaction --no-progress; \
+    composer dump-autoload;
+
+CMD composer install -n --no-progress ; \
+    php index.php

+ 2 - 1
composer.json

@@ -1,5 +1,5 @@
 {
-  "name": "export",
+  "name": "flowdat/export",
   "description": "Export files from Flowdat",
   "version": "1.0.0",
   "authors": [
@@ -9,6 +9,7 @@
     }
   ],
   "require": {
+    "php": "7.*",
     "vlucas/phpdotenv": "*",
     "php-amqplib/php-amqplib": ">=2.6.1",
     "doctrine/orm": "^2.5",

+ 9 - 7
composer.lock

@@ -4,20 +4,20 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "content-hash": "ac78c96b02ba0340303688dbe6a08100",
+    "content-hash": "02e48610569edeb96f07d43a063765c1",
     "packages": [
         {
             "name": "aws/aws-sdk-php",
-            "version": "3.135.0",
+            "version": "3.135.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/aws/aws-sdk-php.git",
-                "reference": "254f168f90b1846ffb3f70594280e66b9f10a85e"
+                "reference": "1810725052836683d0cfd2907d515173058e710e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/254f168f90b1846ffb3f70594280e66b9f10a85e",
-                "reference": "254f168f90b1846ffb3f70594280e66b9f10a85e",
+                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/1810725052836683d0cfd2907d515173058e710e",
+                "reference": "1810725052836683d0cfd2907d515173058e710e",
                 "shasum": ""
             },
             "require": {
@@ -88,7 +88,7 @@
                 "s3",
                 "sdk"
             ],
-            "time": "2020-04-20T18:16:34+00:00"
+            "time": "2020-04-22T18:11:15+00:00"
         },
         {
             "name": "doctrine/annotations",
@@ -2797,8 +2797,10 @@
     "prefer-stable": false,
     "prefer-lowest": false,
     "platform": {
+        "php": "7.*",
         "ext-json": "*",
-        "ext-curl": "*"
+        "ext-curl": "*",
+        "ext-simplexml": "*"
     },
     "platform-dev": []
 }

+ 1 - 1
src/App/Factory/S3Factory.php

@@ -12,7 +12,7 @@ class S3Factory
             $client = new S3Client([
                 'version' => 'latest',
                 'region'  => 'us-east-1',
-                'endpoint' => 'http://localhost:9004',
+                'endpoint' => 'http://minio:9000',
                 'use_path_style_endpoint' => true,
                 'credentials' => [
                     'key'    => getenv('MINIO_ACCESS_KEY'),

+ 1 - 1
src/App/Listener/ExportListener.php

@@ -18,7 +18,7 @@ class ExportListener
 
     public function __construct()
     {
-        $this->connectionAMQP = new AMQPStreamConnection(getenv('HOST_AMQP'), '5672', 'guest', 'guest');
+        $this->connectionAMQP = new AMQPStreamConnection('amqp', '5672', 'guest', 'guest');
         $this->channelAMQP = $this->connectionAMQP->channel();
     }