瀏覽代碼

fixes varios

Luciano Andrade 7 年之前
父節點
當前提交
45ef593da9
共有 6 個文件被更改,包括 260 次插入195 次删除
  1. 4 3
      .drone.yml
  2. 2 3
      Dockerfile
  3. 1 1
      bin/symfony_requirements
  4. 2 2
      composer.json
  5. 250 185
      composer.lock
  6. 1 1
      web/config.php

+ 4 - 3
.drone.yml

@@ -14,7 +14,7 @@ pipeline:
   image: debian:9.0
   commands:
       - echo 'Acquire::http { Proxy "http://200.50.168.30:3142"; };' > /etc/apt/apt.conf.d/01proxy
-      - apt-get update && apt-get install -yq build-essential git php7.0-cli php7.0-mysql mysql-client php7.0-curl php7.0-xml php7.0-bcmath php7.0-mbstring
+      - apt-get update && apt-get install -yq build-essential git php7.0-cli php7.0-mysql mysql-client php7.0-curl php7.0-xml php7.0-bcmath php7.0-mbstring php7.0-zip
 
       - yes | mysqladmin -h 127.0.0.1 create fd3_stats
       - yes | mysqladmin -h 127.0.0.1 create fd_session
@@ -23,7 +23,6 @@ pipeline:
       - php composer-setup.php --install-dir=/usr/local/bin/ --filename=composer
       - php -r "unlink('composer-setup.php');"
       - echo 'client = Flowdat3-Stats-Drone-Test' | tee /etc/flowdat.conf
-      - echo 'date.timezone="America/Argentina/Buenos_Aires"' >> /etc/php5/cli/php.ini
       - mkdir -p /root/.ssh/
       - ssh-keyscan bitbucket.org >> ~/.ssh/known_hosts
       - ssh-keyscan -p222 200.50.168.30 >> ~/.ssh/known_hosts
@@ -31,7 +30,6 @@ pipeline:
       - ssh-keyscan -p222 gogs.infra.flowdat.com >> ~/.ssh/known_hosts
       - chmod 0400 keys/bitbucket.id_rsa
       - eval $(ssh-agent); ssh-add keys/bitbucket.id_rsa
-      - composer update -n
       - composer install -n
       - chmod 0777 -R var/logs var/cache var/sessions
       - php bin/console doctrine:schema:update --force -vvv --env=test
@@ -45,3 +43,6 @@ pipeline:
    username: drone
    password: 6hd2dLfL
    tag: latest
+   when:
+     event: [pull_request, push, tag]
+     branch: master

+ 2 - 3
Dockerfile

@@ -1,10 +1,9 @@
-FROM debian:8
+FROM debian:9
 EXPOSE 8000
 
 #RUN echo "Acquire::http::Proxy \"http://172.17.0.5:3142\";" | tee /etc/apt/apt.conf.d/00aptproxy
 
-RUN apt-get update 
-RUN apt-get install -yq python git wget vim tmux php5-cli php5-mysql php5-curl
+RUN apt-get update && apt-get install -yq build-essential git php7.0-cli php7.0-mysql mysql-client php7.0-curl php7.0-xml php7.0-bcmath php7.0-mbstring php7.0-zip
 
 RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
 RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"

+ 1 - 1
bin/symfony_requirements

@@ -1,7 +1,7 @@
 #!/usr/bin/env php
 <?php
 
-require_once dirname(__FILE__).'/../var/SymfonyRequirements.php';
+require_once dirname(__FILE__).'/./SymfonyRequirements.php';
 
 $lineSize = 70;
 $symfonyRequirements = new SymfonyRequirements();

+ 2 - 2
composer.json

@@ -138,7 +138,7 @@
             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
         ],
 	"doctrine-update": "php bin/console doctrine:schema:update --force",
-        "doctrine-migrations":"php bin/console doctrine:migrations:migrate --no-interaction",
+        "doctrine-migrations":"php bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration",
         "copy-user-settings":"cp -n app/config/user_settings.yml.dist app/config/user_settings.yml",
         "chown-user-settings":"chown -f www-data:www-data app/config/user_settings.yml",
         "mkdir-dir-cache-sessions-logs": "mkdir -p var/cache var/logs var/sessions",
@@ -149,9 +149,9 @@
         "post-install-cmd": [
             "@symfony-scripts",
             "@chmod-dir-cache-sessions-logs",
+            "@doctrine-migrations",
             "@doctrine-update",
             "@auto-increment",
-            "@doctrine-migrations",
             "@copy-user-settings",
             "@chown-user-settings"
 

文件差異過大導致無法顯示
+ 250 - 185
composer.lock


+ 1 - 1
web/config.php

@@ -22,7 +22,7 @@ if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
     exit('This script is only accessible from localhost.');
 }
 
-require_once dirname(__FILE__).'/../var/SymfonyRequirements.php';
+require_once dirname(__FILE__).'/./SymfonyRequirements.php';
 
 $symfonyRequirements = new SymfonyRequirements();