Skip to content

Commit

Permalink
Docker: Use the OpenConext Apache2 base image
Browse files Browse the repository at this point in the history
  • Loading branch information
quartje committed Nov 6, 2023
1 parent 321335e commit 232d84d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 500 deletions.
6 changes: 3 additions & 3 deletions client/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM httpd:2.4
FROM ghcr.io/openconext/openconext-basecontainers/apache2:latest
ADD ./build/ /var/www/
COPY ./docker/httpd.conf /usr/local/apache2/conf/httpd.conf
COPY ./docker/appconf.conf /usr/local/apache2/conf/extra/
RUN rm -rf /etc/apache2/sites-enabled/*.conf
COPY ./docker/appconf.conf /etc/apache2/sites-enabled/

14 changes: 8 additions & 6 deletions client/docker/appconf.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Listen 80
ServerName accessclient
RewriteEngine On
RewriteCond %{REQUEST_URI} !\.(js|css)(\.map)?$
Expand All @@ -21,19 +20,22 @@ RewriteCond %{REQUEST_URI} !^/fonts/
RewriteRule (.*) /index.html [L]
ProxyPass /api http://inviteserver:8080/api retry=0
ProxyPassReverse /api http://inviteserver:8080/api
ProxyPassMatch ^/oauth2(.*)$ http://inviteserver:8080 retry=0
ProxyPassMatch ^/oauth2(.*)$ http://inviteserver:8080
ProxyPassReverse /oauth2 http://inviteserver:8080/oauth2
ProxyPassMatch ^/internal(.*)$ http://inviteserver:8080 retry=0
ProxyPassMatch ^/internal(.*)$ http://inviteserver:8080
ProxyPassReverse /internal http://inviteserver:8080/internal
ProxyPassMatch ^/login(.*)$ http://inviteserver:8080 retry=0
ProxyPassMatch ^/login(.*)$ http://inviteserver:8080
ProxyPassReverse /login http://inviteserver:8080/login
ProxyPassMatch ^/ui(.*)$ http://inviteserver:8080 retry=0
ProxyPassMatch ^/ui(.*)$ http://inviteserver:8080
ProxyPassReverse /ui http://inviteserver:8080/ui
ProxyPass /deprovision http://inviteserver:8080/api retry=0
ProxyPass /deprovision http://inviteserver:8080/api
ProxyPassReverse /deprovision http://inviteserver:8080/api

ErrorLog /proc/self/fd/2
CustomLog /proc/self/fd/1 common

DocumentRoot /var/www/

<Location "/api">
ProxyPreserveHost On
</Location>
Expand Down
242 changes: 0 additions & 242 deletions client/docker/httpd.conf

This file was deleted.

6 changes: 3 additions & 3 deletions welcome/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM httpd:2.4
FROM ghcr.io/openconext/openconext-basecontainers/apache2:latest
ADD ./build/ /var/www/
COPY ./docker/httpd.conf /usr/local/apache2/conf/httpd.conf
COPY ./docker/appconf.conf /usr/local/apache2/conf/extra/
RUN rm -rf /etc/apache2/sites-enabled/*.conf
COPY ./docker/appconf.conf /etc/apache2/sites-enabled/

11 changes: 7 additions & 4 deletions welcome/docker/appconf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,18 @@ RewriteCond %{REQUEST_URI} !^/deprovision/
RewriteCond %{REQUEST_URI} !^/fonts/
RewriteRule (.*) /index.html [L]

ProxyPass /api http://inviteserver:8080/api retry=0
ProxyPass /api http://inviteserver:8080/api
ProxyPassReverse /api http://inviteserver:8080/api
ProxyPassMatch ^/oauth2(.*)$ http://inviteserver:8080 retry=0
ProxyPassMatch ^/oauth2(.*)$ http://inviteserver:8080
ProxyPassReverse /oauth2 http://inviteserver:8080/oauth2
ProxyPassMatch ^/internal(.*)$ http://inviteserver:8080 retry=0
ProxyPassMatch ^/internal(.*)$ http://inviteserver:8080
ProxyPassReverse /internal http://inviteserver:8080/internal
ProxyPassMatch ^/login(.*)$ http://inviteserver:8080 retry=0
ProxyPassMatch ^/login(.*)$ http://inviteserver:8080
ProxyPassReverse /login http://inviteserver:8080/login

ErrorLog /proc/self/fd/2
CustomLog /proc/self/fd/1 common

DocumentRoot /var/www/
<Location "/api">
ProxyPreserveHost On
Expand Down
Loading

0 comments on commit 232d84d

Please sign in to comment.