Marc Kupietz | 145b9c9 | 2023-03-01 16:37:05 +0100 | [diff] [blame] | 1 | image: php:8.1-apache |
| 2 | |
| 3 | build: |
| 4 | stage: build |
Marc Kupietz | 975a221 | 2023-04-12 11:11:11 +0200 | [diff] [blame] | 5 | before_script: |
Marc Kupietz | 145b9c9 | 2023-03-01 16:37:05 +0100 | [diff] [blame] | 6 | - apt-get update |
Marc Kupietz | 975a221 | 2023-04-12 11:11:11 +0200 | [diff] [blame] | 7 | - apt-get install -y git redis ocrad imagemagick libpng-dev zlib1g-dev zlib1g-dev libzip-dev unzip mariadb-server |
Marc Kupietz | 145b9c9 | 2023-03-01 16:37:05 +0100 | [diff] [blame] | 8 | - docker-php-ext-install zip |
Marc Kupietz | 975a221 | 2023-04-12 11:11:11 +0200 | [diff] [blame] | 9 | - docker-php-ext-install gd pdo pdo_mysql |
Marc Kupietz | 145b9c9 | 2023-03-01 16:37:05 +0100 | [diff] [blame] | 10 | - curl -sS https://getcomposer.org/installer -o composer-setup.php |
| 11 | - php composer-setup.php --install-dir=/usr/local/bin --filename=composer |
| 12 | - pear install mail |
| 13 | - pear install Net_SMTP |
| 14 | - pear install Auth_SASL |
| 15 | - pear install mail_mime |
Marc Kupietz | 975a221 | 2023-04-12 11:11:11 +0200 | [diff] [blame] | 16 | - composer config github-oauth.github.com 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 |
Marc Kupietz | 145b9c9 | 2023-03-01 16:37:05 +0100 | [diff] [blame] | 17 | - composer install |
| 18 | - mv config.php.example config.php |
| 19 | - rm -rf /var/www/html |
| 20 | - ln -s $CI_PROJECT_DIR /var/www/html |
Marc Kupietz | 975a221 | 2023-04-12 11:11:11 +0200 | [diff] [blame] | 21 | - mkdir -p $CI_PROJECT_DIR/logs |
| 22 | - chmod a+rwX $CI_PROJECT_DIR/logs |
| 23 | - ls -lrtR $CI_PROJECT_DIR |
Marc Kupietz | 145b9c9 | 2023-03-01 16:37:05 +0100 | [diff] [blame] | 24 | - service apache2 start |
Marc Kupietz | 975a221 | 2023-04-12 11:11:11 +0200 | [diff] [blame] | 25 | - echo "DB SET UP:" |
| 26 | - service mariadb start |
| 27 | - mysql --user=root --host=localhost --execute "CREATE DATABASE signup;" |
Marc Kupietz | 145b9c9 | 2023-03-01 16:37:05 +0100 | [diff] [blame] | 28 | script: |
Marc Kupietz | 975a221 | 2023-04-12 11:11:11 +0200 | [diff] [blame] | 29 | - cat create_user_table.sql | mysql --user=root --host=localhost -D signup |
| 30 | - echo "ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('mysqlpassword');" | mysql --user=root --host=localhost -D signup |
Marc Kupietz | 145b9c9 | 2023-03-01 16:37:05 +0100 | [diff] [blame] | 31 | - curl -s "http://localhost/" | grep Username |
Marc Kupietz | 975a221 | 2023-04-12 11:11:11 +0200 | [diff] [blame] | 32 | - curl -s "http://localhost/?type=recover" | grep -i Reset |
| 33 | - sed -i 's/CONFERENCE_REGISTRATION *= *false/CONFERENCE_REGISTRATION = true/' config.php |
| 34 | - curl -s "http://localhost/" | grep "places left" |
| 35 | |