-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix docker use buildkit wip docker volumes wip should be done now done add mysql to volumes fix upgrades fix version comparison fix backup restoration and Claroline upgrade fix invalid composer script add public folder to volumes in order to keep generated files between runs * fix docker use buildkit wip docker volumes wip should be done now done add mysql to volumes fix upgrades fix version comparison fix backup restoration and Claroline upgrade fix invalid composer script add public folder to volumes in order to keep generated files between runs fix initial install fix upgrade fix dist fix upgrade logic fix first upgrade * docker improvement wip * fix cache delete in composer.json Co-authored-by: Gruber Laurent <laurent.gruber@claroline.com>
- Loading branch information
1 parent
6ceeef4
commit c3c7a21
Showing
11 changed files
with
179 additions
and
72 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,3 +1,4 @@ | ||
[mysqld] | ||
|
||
sql_mode = "" | ||
default_authentication_plugin = "mysql_native_password" |
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,68 +1,60 @@ | ||
FROM php:7.0.7-apache | ||
FROM php:7.4-apache | ||
|
||
MAINTAINER Donovan Tengblad | ||
LABEL maintainer="Donovan Tengblad" | ||
|
||
RUN a2enmod rewrite expires ssl headers | ||
|
||
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash | ||
RUN apt-get update && apt-get install -y \ | ||
git \ | ||
mysql-client \ | ||
mariadb-client \ | ||
wget \ | ||
unzip \ | ||
zip \ | ||
libxml2-dev \ | ||
libmcrypt-dev \ | ||
libcurl4-gnutls-dev \ | ||
wkhtmltopdf \ | ||
xz-utils \ | ||
xfonts-75dpi \ | ||
libav-tools \ | ||
libldap2-dev \ | ||
libpng12-dev \ | ||
libpng-dev \ | ||
libjpeg-dev \ | ||
zlib1g-dev \ | ||
libicu-dev \ | ||
libzip-dev \ | ||
libonig-dev \ | ||
g++ \ | ||
ssl-cert \ | ||
curl \ | ||
npm \ | ||
nodejs\ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN docker-php-ext-install -j$(nproc) xml mcrypt mysqli curl zip mbstring gettext pdo_mysql gd exif mbstring | ||
RUN docker-php-ext-install -j$(nproc) xml mysqli curl zip mbstring gettext pdo_mysql gd exif mbstring | ||
RUN docker-php-ext-configure intl | ||
RUN docker-php-ext-install intl | ||
RUN docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && docker-php-ext-install ldap | ||
|
||
RUN npm cache clean -f \ | ||
&& npm install -g n \ | ||
&& n 5.11.1 | ||
|
||
RUN curl -sS https://getcomposer.org/installer | php | ||
RUN mv composer.phar /usr/local/bin/composer | ||
|
||
RUN wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz | ||
RUN tar -xf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz | ||
|
||
RUN mv wkhtmltox/bin/wkhtmltopdf /usr/bin/wkhtmltopdf.sh | ||
RUN mv wkhtmltox/bin/wkhtmltoimage /usr/bin/wkhtmltoimage.sh | ||
RUN rm -r wkhtmltox | ||
RUN rm wkhtmltox-0.12.3_linux-generic-amd64.tar.xz | ||
|
||
RUN pecl install apcu-beta \ | ||
&& echo extension=apcu.so > /usr/local/etc/php/conf.d/apcu.ini | ||
&& echo extension=apcu.so > /usr/local/etc/php/conf.d/apcu.ini | ||
|
||
COPY config/php.ini /usr/local/etc/php/ | ||
COPY ./.docker/web/config/php.ini /usr/local/etc/php/ | ||
COPY ./.docker/web/files/apache2/claroline.conf /etc/apache2/sites-available/ | ||
COPY ./.docker/web/files/apache2/claroline-ssl.conf /etc/apache2/sites-available/ | ||
RUN a2dissite 000-default && a2dissite default-ssl && a2ensite claroline.conf | ||
|
||
COPY ./files/apache2/claroline.conf /etc/apache2/sites-available/ | ||
COPY ./files/apache2/claroline-ssl.conf /etc/apache2/sites-available/ | ||
COPY . /var/www/html/claroline | ||
WORKDIR /var/www/html/claroline | ||
|
||
RUN a2dissite 000-default && a2dissite default-ssl && a2ensite claroline.conf | ||
RUN php bin/configure | ||
RUN php bin/check | ||
RUN composer install --no-dev --optimize-autoloader | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
RUN npm install | ||
RUN npm run webpack | ||
|
||
COPY ./.docker/web/entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
|
||
WORKDIR /var/www/html/claroline | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
CMD ["apache2-foreground"] |
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
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,5 +1,5 @@ | ||
Listen 443 | ||
SSLEngine on | ||
DocumentRoot /var/www/html/claroline/web | ||
DocumentRoot /var/www/html/claroline/public | ||
|
||
#entrypoint.sh appended configuration |
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
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Docker Compose Actions Workflow | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build the stack | ||
# run: docker-compose up # remove -d in order to see the build output in gh actions for debugging - you'll need to cancel the run manually once it's done | ||
run: docker-compose up -d | ||
env: | ||
DOCKER_BUILDKIT: 1 | ||
COMPOSE_DOCKER_CLI_BUILD: 1 | ||
- name: Test 127.0.0.1 | ||
run: docker run --network container:claroline-web curlimages/curl -s --connect-timeout 500 --max-time 1000 --retry 5000 --retry-delay 10 --retry-max-time 4000 --retry-all-errors http://127.0.0.1/ | ||
- name: Test 172.22.9.6 | ||
run: docker run --network container:claroline-web curlimages/curl -s --connect-timeout 50 --max-time 100 --retry 50 --retry-delay 10 --retry-max-time 40 --retry-all-errors http://172.22.9.6/ |
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
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
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
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
Oops, something went wrong.