File tree Expand file tree Collapse file tree 3 files changed +62
-0
lines changed
Expand file tree Collapse file tree 3 files changed +62
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM ghcr.io/openconext/openconext-basecontainers/php72-apache2-node14-composer2:latest
2+
3+ RUN rm -rf /etc/apache2/sites-enabled/*
4+ COPY ./docker/conf/selfservice-apache2.conf /etc/apache2/sites-enabled/selfservice.conf
5+ EXPOSE 80
6+
7+ # Set the default workdir
8+ WORKDIR /var/www/html
9+
10+ CMD ["apache2-foreground"]
Original file line number Diff line number Diff line change 1+ FROM ghcr.io/openconext/openconext-basecontainers/php72-apache2:latest AS php-build
2+ COPY *.tar.bz2 /tmp/
3+ RUN tar -xvjf /tmp/*.tar.bz2 -C /var/www/html/ && \
4+ rm -rf /tmp/*.tar.bz2
5+
6+ # Add the application configuration files
7+ COPY .env .env
8+ COPY config/legacy/parameters.yaml.dist config/legacy/parameters.yaml
9+
10+ # Add the config files for Apache2
11+ RUN rm -rf /etc/apache2/sites-enabled/*
12+ COPY ./docker/conf/selfservice-apache2.conf /etc/apache2/sites-enabled/selfservice.conf
13+ EXPOSE 80
14+
15+ # Set the default workdir
16+ WORKDIR /var/www/html
17+
18+ CMD ["apache2-foreground"]
Original file line number Diff line number Diff line change 1+ <Virtualhost *:80>
2+ ServerName selfservice
3+ 4+
5+ DocumentRoot /var/www/html/public
6+
7+ SetEnv APP_ENV prod
8+ SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
9+
10+ <Directory "/var/www/html/public">
11+ Require all granted
12+
13+ Options -MultiViews
14+ RewriteEngine On
15+ RewriteCond %{REQUEST_FILENAME} !-f
16+ RewriteRule ^(.*)$ index.php [QSA,L]
17+ </Directory>
18+ <Location />
19+ Require all granted
20+ </Location>
21+
22+ Header always set X-Content-Type-Options "nosniff"
23+
24+ # Set the php application handler so mod_php interpets the files
25+ <FilesMatch \.php$>
26+ SetHandler application/x-httpd-php
27+ </FilesMatch>
28+
29+ ExpiresActive on
30+ ExpiresByType font/* "access plus 1 year"
31+ ExpiresByType image/* "access plus 6 months"
32+ ExpiresByType text/css "access plus 1 year"
33+ ExpiresByType text/js "access plus 1 year"
34+ </VirtualHost>
You can’t perform that action at this time.
0 commit comments