forked from ucsf-education/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9e8e3a
commit af7c589
Showing
1 changed file
with
22 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,23 @@ | ||
services: | ||
webserver: | ||
image: "moodlehq/moodle-php-apache:8.2" | ||
#image: "tugboatqa/php:8.2-apache" | ||
image: "tugboatqa/php:8.2-apache" | ||
default: true | ||
depends_on: | ||
- db | ||
commands: | ||
init: | ||
- echo "****** initializing webserver *****" | ||
- pwd | ||
|
||
- su | ||
- apt-get update | ||
- apt-get install sudo | ||
|
||
#- echo "****** installing required php extensions *****" | ||
#- sudo apt-get update | ||
#- sudo apt-get install libzip-dev | ||
#- sudo apt-get install -y unzip git | ||
#- docker-php-ext-install mysqli | ||
#- docker-php-ext-install zip | ||
#- docker-php-ext-install soap | ||
#- docker-php-ext-install intl | ||
#- docker-php-ext-install exif | ||
- echo "****** installing required php extensions *****" | ||
- sudo apt-get update | ||
- sudo apt-get install libzip-dev | ||
- sudo apt-get install -y unzip git | ||
- docker-php-ext-install mysqli | ||
- docker-php-ext-install zip | ||
- docker-php-ext-install soap | ||
- docker-php-ext-install intl | ||
- docker-php-ext-install exif | ||
|
||
- echo "****** initializing the submodules *****" | ||
- git config submodule.admin/tool/ucsfsomapi.url https://lbailey-ucsf:${GITHUB_TOKEN}@github.com/ucsf-education/tool_ucsfsomapi.git | ||
|
@@ -31,32 +27,27 @@ services: | |
- echo "max_input_vars = 5000" >> /usr/local/etc/php/conf.d/max_input_vars.ini | ||
|
||
# Link the document root to the expected path. Note: the TUGBOAT_ROOT environment variable is equivalent to the git repo root. | ||
#- ln -snf "$TUGBOAT_ROOT" "${DOCROOT}" | ||
- ln -snf "$TUGBOAT_ROOT" "/var/www/html" | ||
- ln -snf "$TUGBOAT_ROOT" "${DOCROOT}" | ||
|
||
#make required dirs and set permissions. | ||
#- mkdir /var/www/moodledata | ||
#- mkdir /var/www/phpunitdata | ||
#- mkdir /var/www/behatdata | ||
#- mkdir /var/www/behatfaildumps | ||
#- chmod 0777 /var/www/moodledata | ||
- mkdir /var/www/moodledata | ||
- mkdir /var/www/phpunitdata | ||
- mkdir /var/www/behatdata | ||
- mkdir /var/www/behatfaildumps | ||
- chmod 0777 /var/www/moodledata | ||
#- chown www-data $DOCROOT | ||
|
||
|
||
update: | ||
- composer install --optimize-autoloader --ignore-platform-req=ext-zip --ignore-platform-req=ext-intl | ||
- service apache2 start | ||
|
||
build: | ||
# - npm install | ||
# - npx grunt | ||
# Install/update packages managed by composer | ||
#- composer install --optimize-autoloader --ignore-platform-req=ext-zip --ignore-platform-req=ext-intl | ||
#- chown www-data $DOCROOT | ||
- chown www-data $TUGBOAT_ROOT | ||
- sudo -u www-data php admin/cli/install.php --non-interactive --agree-license --lang=en --wwwroot=https://${TUGBOAT_DEFAULT_SERVICE_URL_HOST}/tugboat --dataroot=/var/www/moodledata --dbtype=mariadb --dbhost=db --dbname=moodle --dbuser=moodle --dbpass=m00dl3ing --adminuser=admin --adminpass=Admin123! --prefix=m_ --fullname=PREVIEW --shortname=PREVIEW [email protected] | ||
#- chown -R root $DOCROOT | ||
#- chown -R root $TUGBOAT_ROOT | ||
- chown -R root $TUGBOAT_ROOT | ||
- chown www-data $DOCROOT | ||
- sudo -u www-data php admin/cli/install.php --non-interactive --agree-license --lang=en --wwwroot=https://${TUGBOAT_DEFAULT_SERVICE_URL_HOST} --dataroot=/var/www/moodledata --dbtype=mariadb --dbhost=db --dbname=moodle --dbuser=moodle --dbpass=m00dl3ing --adminuser=admin --adminpass=Admin123! --prefix=m_ --fullname=PREVIEW --shortname=PREVIEW [email protected] | ||
- chown -R root $DOCROOT | ||
|
||
online: | ||
- php admin/tool/generator/cli/maketestsite.php --size=S --bypasscheck | ||
|
@@ -65,6 +56,7 @@ services: | |
image: "tugboatqa/mariadb:10.7" | ||
commands: | ||
init: | ||
- echo "*** intializing database ***" | ||
- mysql -e "SET GLOBAL character_set_server=utf8mb4;" | ||
- mysql -e "SET GLOBAL collation_server=utf8mb4_bin;" | ||
- mysql -e "SET GLOBAL innodb_file_per_table=ON;" | ||
|