21 lines
891 B
Docker
21 lines
891 B
Docker
FROM httpd:2.4
|
|
|
|
# Enable mod_proxy and mod_proxy_http
|
|
RUN sed -i '/^#LoadModule proxy_module/s/^#//' /usr/local/apache2/conf/httpd.conf && \
|
|
sed -i '/^#LoadModule proxy_http_module/s/^#//' /usr/local/apache2/conf/httpd.conf
|
|
|
|
# Copy the HTML file
|
|
COPY index.html /usr/local/apache2/htdocs/
|
|
|
|
# Add a proxy configuration for /counter
|
|
#RUN echo "ProxyPass /counter http://backend-service:5000/counter" >> /usr/local/apache2/conf/httpd.conf && \
|
|
# echo "ProxyPassReverse /counter http://backend-service:5000/counter" >> /usr/local/apache2/conf/httpd.conf
|
|
|
|
|
|
#Add a proxy configuration for /counter
|
|
RUN echo "ProxyPass /counter http://backend-service.visitor-app.svc.cluster.local:5000/counter" >> /usr/local/apache2/conf/httpd.conf && \
|
|
echo "ProxyPassReverse /counter http://backend-service.visitor-app.svc.cluster.local:5000/counter" >> /usr/local/apache2/conf/httpd.conf
|
|
|
|
|
|
EXPOSE 80
|