Skip to content

Commit

Permalink
Merge pull request #265 from silinternational/develop
Browse files Browse the repository at this point in the history
Release 10.0.0-alpha.7 -- miscellaneous fixes
  • Loading branch information
briskt authored Jul 18, 2024
2 parents 7046663 + fcbf62a commit f4ea746
Show file tree
Hide file tree
Showing 26 changed files with 1,141 additions and 1,496 deletions.
30 changes: 6 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
FROM silintl/php8:8.1

LABEL maintainer="Steve Bagwell <[email protected]>"

ENV REFRESHED_AT 2021-06-14
LABEL maintainer="[email protected]"

RUN apt-get update -y \
&& apt-get install -y \
php-gmp \
&& apt-get --no-install-recommends install -y php-gmp \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Create required directories
RUN mkdir -p /data
WORKDIR /data

COPY dockerbuild/vhost.conf /etc/apache2/sites-enabled/
COPY dockerbuild/run.sh /data/run.sh
Expand All @@ -22,24 +18,19 @@ COPY dockerbuild/apply-dictionaries-overrides.php /data/
# Note the name change: repos extending this one should only run the metadata
# tests, so those are the only tests we make available to them.
COPY dockerbuild/run-metadata-tests.sh /data/run-tests.sh
COPY tests/MetadataTest.php /data/tests/MetadataTest.php

# ErrorLog inside a VirtualHost block is ineffective for unknown reasons
RUN sed -i -E 's@ErrorLog .*@ErrorLog /proc/1/fd/2@i' /etc/apache2/apache2.conf

# get s3-expand
RUN curl https://raw.githubusercontent.com/silinternational/s3-expand/1.5/s3-expand -fo /usr/local/bin/s3-expand \
&& chmod a+x /usr/local/bin/s3-expand

WORKDIR /data

# Install/cleanup composer dependencies
ARG COMPOSER_FLAGS="--prefer-dist --no-interaction --no-dev --optimize-autoloader --no-scripts --no-progress"
COPY composer.json /data/
COPY composer.lock /data/
RUN composer self-update --no-interaction
RUN COMPOSER_ALLOW_SUPERUSER=1 composer install $COMPOSER_FLAGS

ENV SSP_PATH /data/vendor/simplesamlphp/simplesamlphp
ENV SSP_PATH=/data/vendor/simplesamlphp/simplesamlphp

# Copy modules into simplesamlphp
COPY modules/ $SSP_PATH/modules
Expand All @@ -52,27 +43,18 @@ COPY modules/material/themes/material/profilereview/* $SSP_PATH/modules/profiler
COPY modules/material/themes/material/silauth/* $SSP_PATH/modules/silauth/templates/

# Copy in SSP override files
RUN mv $SSP_PATH/public/index.php $SSP_PATH/public/ssp-index.php
COPY dockerbuild/ssp-overrides/index.php $SSP_PATH/public/index.php
COPY dockerbuild/ssp-overrides/saml20-idp-remote.php $SSP_PATH/metadata/saml20-idp-remote.php
COPY dockerbuild/ssp-overrides/saml20-sp-remote.php $SSP_PATH/metadata/saml20-sp-remote.php
COPY dockerbuild/config/* $SSP_PATH/config/
COPY dockerbuild/ssp-overrides/id.php $SSP_PATH/public/id.php
COPY dockerbuild/ssp-overrides/announcement.php $SSP_PATH/announcement/announcement.php
COPY dockerbuild/ssp-overrides/sp-php.patch sp-php.patch
RUN patch /data/vendor/simplesamlphp/simplesamlphp/modules/saml/src/Auth/Source/SP.php sp-php.patch

COPY tests /data/tests

RUN chmod a+x /data/run.sh /data/run-tests.sh

ADD https://github.com/silinternational/config-shim/releases/latest/download/config-shim.gz config-shim.gz
ADD https://github.com/silinternational/config-shim/releases/download/v1.0.0/config-shim.gz config-shim.gz
RUN gzip -d config-shim.gz && chmod 755 config-shim && mv config-shim /usr/local/bin

# Set permissions for cache directory. Corresponds to the `cachedir` setting in config.php.
RUN mkdir /data/cache
RUN chown -R www-data:www-data /data/cache

EXPOSE 80
ENTRYPOINT ["/usr/local/bin/s3-expand"]
CMD ["/data/run.sh"]
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
"simplesamlphp/composer-module-installer": "^1.0",
"rlanvin/php-ip": "^1.0",
"silinternational/ssp-utilities": "v2.0.0",
"silinternational/php-env": "^3.1.0",
"silinternational/php-env": "^3.2.0",
"silinternational/psr3-adapters": "v4.0.0",
"silinternational/yii2-json-log-targets": "^2.0",
"silinternational/idp-id-broker-php-client": "^4.3",
"sinergi/browser-detector": "^6.1",
"yiisoft/yii2": "~2.0.12",
"yiisoft/yii2-gii": "^2.0",
"google/recaptcha": "^1.1",
Expand Down
68 changes: 7 additions & 61 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions development/hub/metadata/idp-remote.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
],
'IDPNamespace' => 'IDP-1-custom-port',
'logoCaption' => 'IDP-1:8085 staff',
'enabled' => true,
'logoURL' => 'https://dummyimage.com/125x125/0f4fbd/ffffff.png&text=IDP+1+8085',

'description' => 'Local IDP for testing SSP Hub (custom port)',
Expand All @@ -39,7 +38,6 @@
],
'IDPNamespace' => 'IDP-1',
'logoCaption' => 'IDP-1 staff',
'enabled' => true,
'logoURL' => 'https://dummyimage.com/125x125/0f4fbd/ffffff.png&text=IDP+1',

'description' => 'Local IDP for testing SSP Hub (default port)',
Expand All @@ -65,7 +63,6 @@
],
'IDPNamespace' => 'IDP-2-custom-port',
'logoCaption' => 'IDP-2:8086 staff',
'enabled' => true,
'logoURL' => 'https://dummyimage.com/125x125/0f4fbd/ffffff.png&text=IDP+2+8086',

'description' => 'Local IDP2 for testing SSP Hub (custom port)',
Expand All @@ -85,7 +82,6 @@
],
'IDPNamespace' => 'IDP-2',
'logoCaption' => 'IDP-2 staff',
'enabled' => true,
'logoURL' => 'https://dummyimage.com/125x125/0f4fbd/ffffff.png&text=IDP+2',

'description' => 'Local IDP2 for testing SSP Hub (normal port)',
Expand All @@ -109,7 +105,6 @@
],
'IDPNamespace' => 'IDP-3-custom-port',
'logoCaption' => 'IDP-3:8087 staff',
'enabled' => false,
'logoURL' => 'https://dummyimage.com/125x125/0f4fbd/ffffff.png&text=IDP+3+8087',

'description' => 'Local IDP3 for testing SSP Hub (custom port)',
Expand All @@ -126,7 +121,6 @@
],
'IDPNamespace' => 'IDP-3',
'logoCaption' => 'IDP-3 staff',
'enabled' => false,
'logoURL' => 'https://dummyimage.com/125x125/0f4fbd/ffffff.png&text=IDP+3',

'description' => 'Local IDP3 for testing SSP Hub',
Expand Down
Loading

0 comments on commit f4ea746

Please sign in to comment.