-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker build: Use the latest actions and upgrade to php8
- Loading branch information
Showing
3 changed files
with
81 additions
and
23 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
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,20 +1,24 @@ | ||
FROM ghcr.io/openconext/openconext-basecontainers/php72-apache2:latest AS php-build | ||
FROM ghcr.io/openconext/openconext-basecontainers/php82-apache2:latest | ||
ARG APP_VERSION | ||
ARG GIT_SHA | ||
ARG GIT_COMMIT_TIME | ||
ENV OPENCONEXT_APP_VERSION=${APP_VERSION} | ||
ENV OPENCONEXT_GIT_SHA=${GIT_SHA} | ||
ENV OPENCONEXT_COMMIT_DATE=${GIT_COMMIT_TIME} | ||
|
||
# Set the default workdir | ||
WORKDIR /var/www/html | ||
COPY *.tar.bz2 /tmp/ | ||
RUN tar -xvjf /tmp/*.tar.bz2 -C /var/www/html/ && \ | ||
rm -rf /tmp/*.tar.bz2 | ||
|
||
# Add the application configuration files | ||
COPY config/legacy/parameters.yaml.dist config/legacy/parameters.yaml | ||
COPY config/legacy/samlstepupproviders_parameters.yaml.dist config/legacy/samlstepupproviders_parameters.yaml | ||
COPY config/packages/prod/monolog.yaml.docker config/packages/prod/monolog.yaml | ||
|
||
COPY config/openconext/parameters.yaml.dist config/openconext/parameters.yaml | ||
COPY config/openconext/samlstepupproviders_parameters.yaml.dist config/openconext/samlstepupproviders_parameters.yaml | ||
|
||
# Add the config files for Apache2 | ||
RUN rm -rf /etc/apache2/sites-enabled/* | ||
COPY ./docker/conf/ra-apache2.conf /etc/apache2/sites-enabled/ra.conf | ||
RUN rm -rf /var/www/html/var/cache/prod && chown -R www-data /var/www/html/var | ||
|
||
# Set the default workdir | ||
WORKDIR /var/www/html | ||
|
||
CMD ["apache2-foreground"] | ||
COPY ./docker/conf/apache2.conf /etc/apache2/sites-enabled/apache2.conf | ||
RUN rm -rf /var/www/html/var/cache/prod && \ | ||
mkdir -p /var/www/html/var/cache/ && \ | ||
chown -R www-data /var/www/html/var |
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,34 @@ | ||
<Virtualhost *:80> | ||
ServerName ra | ||
ServerAdmin [email protected] | ||
|
||
DocumentRoot /var/www/html/public | ||
|
||
SetEnv HTTPS on | ||
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 | ||
|
||
<Directory "/var/www/html/public"> | ||
Require all granted | ||
|
||
Options -MultiViews | ||
RewriteEngine On | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteRule ^(.*)$ index.php [QSA,L] | ||
</Directory> | ||
<Location /> | ||
Require all granted | ||
</Location> | ||
|
||
Header always set X-Content-Type-Options "nosniff" | ||
|
||
# Set the php application handler so mod_php interpets the files | ||
<FilesMatch \.php$> | ||
SetHandler application/x-httpd-php | ||
</FilesMatch> | ||
|
||
ExpiresActive on | ||
ExpiresByType font/* "access plus 1 year" | ||
ExpiresByType image/* "access plus 6 months" | ||
ExpiresByType text/css "access plus 1 year" | ||
ExpiresByType text/js "access plus 1 year" | ||
</VirtualHost> |