| image: php:8.1-apache |
| |
| build: |
| stage: build |
| before_script: |
| - apt-get update |
| - apt-get install -y git redis ocrad imagemagick libpng-dev zlib1g-dev zlib1g-dev libzip-dev unzip mariadb-server |
| - docker-php-ext-install zip |
| - docker-php-ext-install gd pdo pdo_mysql |
| - curl -sS https://getcomposer.org/installer -o composer-setup.php |
| - php composer-setup.php --install-dir=/usr/local/bin --filename=composer |
| - pear install mail |
| - pear install Net_SMTP |
| - pear install Auth_SASL |
| - pear install mail_mime |
| - composer config github-oauth.github.com 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 |
| - composer install |
| - mv config.php.example config.php |
| - rm -rf /var/www/html |
| - ln -s $CI_PROJECT_DIR /var/www/html |
| - mkdir -p $CI_PROJECT_DIR/logs |
| - chmod a+rwX $CI_PROJECT_DIR/logs |
| - ls -lrtR $CI_PROJECT_DIR |
| - service apache2 start |
| - echo "DB SET UP:" |
| - service mariadb start |
| - mysql --user=root --host=localhost --execute "CREATE DATABASE signup;" |
| script: |
| - cat create_user_table.sql | mysql --user=root --host=localhost -D signup |
| - echo "ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('mysqlpassword');" | mysql --user=root --host=localhost -D signup |
| - curl -s "http://localhost/" | grep Username |
| - curl -s "http://localhost/?type=recover" | grep -i Reset |
| - sed -i 's/CONFERENCE_REGISTRATION *= *false/CONFERENCE_REGISTRATION = true/' config.php |
| - curl -s "http://localhost/" | grep "places left" |
| |