blob: 57a128bf2dc30f59f260bfc69595abd080de3588 [file] [log] [blame]
Marc Kupietz145b9c92023-03-01 16:37:05 +01001image: php:8.1-apache
2
3build:
4 stage: build
Marc Kupietz975a2212023-04-12 11:11:11 +02005 before_script:
Marc Kupietz145b9c92023-03-01 16:37:05 +01006 - apt-get update
Marc Kupietz975a2212023-04-12 11:11:11 +02007 - apt-get install -y git redis ocrad imagemagick libpng-dev zlib1g-dev zlib1g-dev libzip-dev unzip mariadb-server
Marc Kupietz145b9c92023-03-01 16:37:05 +01008 - docker-php-ext-install zip
Marc Kupietz975a2212023-04-12 11:11:11 +02009 - docker-php-ext-install gd pdo pdo_mysql
Marc Kupietz145b9c92023-03-01 16:37:05 +010010 - 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 Kupietz975a2212023-04-12 11:11:11 +020016 - composer config github-oauth.github.com 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
Marc Kupietz145b9c92023-03-01 16:37:05 +010017 - 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 Kupietz975a2212023-04-12 11:11:11 +020021 - mkdir -p $CI_PROJECT_DIR/logs
22 - chmod a+rwX $CI_PROJECT_DIR/logs
23 - ls -lrtR $CI_PROJECT_DIR
Marc Kupietz145b9c92023-03-01 16:37:05 +010024 - service apache2 start
Marc Kupietz975a2212023-04-12 11:11:11 +020025 - echo "DB SET UP:"
26 - service mariadb start
27 - mysql --user=root --host=localhost --execute "CREATE DATABASE signup;"
Marc Kupietz145b9c92023-03-01 16:37:05 +010028 script:
Marc Kupietz975a2212023-04-12 11:11:11 +020029 - 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 Kupietz145b9c92023-03-01 16:37:05 +010031 - curl -s "http://localhost/" | grep Username
Marc Kupietz975a2212023-04-12 11:11:11 +020032 - 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