Merge branch 'alpine-webserver' into 'master'
Alpine webserver See merge request jonasled/website!3
This commit is contained in:
commit
22d193f205
24 changed files with 45 additions and 34 deletions
28
Dockerfile
28
Dockerfile
|
@ -14,35 +14,39 @@ COPY --from=buildJS /build /build
|
|||
RUN cd /build/public/API && composer install
|
||||
|
||||
# Prepare Webserver
|
||||
FROM php:8-apache-buster
|
||||
FROM alpine:latest
|
||||
|
||||
# |--------------------------------------------------------------------------
|
||||
# | install php extensions
|
||||
# | install dependencies
|
||||
# |--------------------------------------------------------------------------
|
||||
RUN docker-php-ext-install mysqli
|
||||
|
||||
# |--------------------------------------------------------------------------
|
||||
# | enable production php ini
|
||||
# |--------------------------------------------------------------------------
|
||||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||
RUN apk update && \
|
||||
apk upgrade && \
|
||||
apk add apache2 php8-apache2 php8-mysqli php8-mbstring curl && \
|
||||
rm /var/www/localhost/htdocs/ -R
|
||||
|
||||
# |--------------------------------------------------------------------------
|
||||
# | copy website from node build
|
||||
# |--------------------------------------------------------------------------
|
||||
COPY --from=composer /build/public /var/www/html
|
||||
COPY --from=composer /build/public /var/www/localhost/htdocs/
|
||||
|
||||
# |--------------------------------------------------------------------------
|
||||
# | enable apache modules
|
||||
# |--------------------------------------------------------------------------
|
||||
RUN a2enmod headers rewrite
|
||||
RUN sed -i '/LoadModule rewrite_module/s/^#//g' /etc/apache2/httpd.conf && \
|
||||
sed -i 's#AllowOverride [Nn]one#AllowOverride All#' /etc/apache2/httpd.conf
|
||||
|
||||
# |--------------------------------------------------------------------------
|
||||
# | enable metrics
|
||||
# | enable healthcheck
|
||||
# |--------------------------------------------------------------------------
|
||||
RUN apt update && apt install curl
|
||||
HEALTHCHECK CMD curl --fail http://localhost || exit 1
|
||||
|
||||
# |--------------------------------------------------------------------------
|
||||
# | expose http port
|
||||
# |--------------------------------------------------------------------------
|
||||
EXPOSE 80
|
||||
|
||||
# |--------------------------------------------------------------------------
|
||||
# | set entrypoint
|
||||
# |--------------------------------------------------------------------------
|
||||
COPY httpd-foreground /usr/local/bin/
|
||||
CMD ["httpd-foreground"]
|
7
httpd-foreground
Executable file
7
httpd-foreground
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Apache gets grumpy about PID files pre-existing
|
||||
rm -f /usr/local/apache2/logs/httpd.pid
|
||||
|
||||
exec httpd -DFOREGROUND "$@"
|
|
@ -83,5 +83,5 @@ chown apache /var/www/localhost/htdocs/ -R</code>
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script async defer src='https://www.hCaptcha.com/1/api.js'></script>
|
||||
<script async defer src='https://hCaptcha.com/1/api.js'></script>
|
||||
<script src="/js/script.js"></script>
|
|
@ -65,5 +65,5 @@ make</code></pre>
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script async defer src='https://www.hCaptcha.com/1/api.js'></script>
|
||||
<script async defer src='https://hCaptcha.com/1/api.js'></script>
|
||||
<script src="/js/script.js"></script>
|
|
@ -41,5 +41,5 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script async defer src='https://www.hCaptcha.com/1/api.js'></script>
|
||||
<script async defer src='https://hCaptcha.com/1/api.js'></script>
|
||||
<script src="/js/script.js"></script>
|
|
@ -48,5 +48,5 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script async defer src='https://www.hCaptcha.com/1/api.js'></script>
|
||||
<script async defer src='https://hCaptcha.com/1/api.js'></script>
|
||||
<script src="/js/script.js"></script>
|
|
@ -27,7 +27,7 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script src='https://www.hCaptcha.com/1/api.js' async defer></script>
|
||||
<script src='https://hCaptcha.com/1/api.js' async defer></script>
|
||||
<script src="/js/script.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -24,5 +24,5 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script async defer src='https://www.hCaptcha.com/1/api.js'></script>
|
||||
<script async defer src='https://hCaptcha.com/1/api.js'></script>
|
||||
<script src="/js/script.js"></script>
|
|
@ -45,5 +45,5 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script async defer src='https://www.hCaptcha.com/1/api.js'></script>
|
||||
<script async defer src='https://hCaptcha.com/1/api.js'></script>
|
||||
<script src="/js/script.js"></script>
|
|
@ -141,5 +141,5 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script async defer src='https://www.hCaptcha.com/1/api.js'></script>
|
||||
<script async defer src='https://hCaptcha.com/1/api.js'></script>
|
||||
<script src="/js/script.js"></script>
|
|
@ -81,5 +81,5 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script async defer src='https://www.hCaptcha.com/1/api.js'></script>
|
||||
<script async defer src='https://hCaptcha.com/1/api.js'></script>
|
||||
<script src="/js/script.js"></script>
|
||||
|
|
|
@ -26,5 +26,5 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script async defer src='https://www.hCaptcha.com/1/api.js'></script>
|
||||
<script async defer src='https://hCaptcha.com/1/api.js'></script>
|
||||
<script src="/js/script.js"></script>
|
|
@ -39,7 +39,7 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script src='https://www.hCaptcha.com/1/api.js' async defer></script>
|
||||
<script src='https://hCaptcha.com/1/api.js' async defer></script>
|
||||
<script src="/js/script.js"></script>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -31,5 +31,5 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script async defer src='https://www.hCaptcha.com/1/api.js'></script>
|
||||
<script async defer src='https://hCaptcha.com/1/api.js'></script>
|
||||
<script src="/js/script.js"></script>
|
|
@ -55,5 +55,5 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script async defer src='https://www.hCaptcha.com/1/api.js'></script>
|
||||
<script async defer src='https://hCaptcha.com/1/api.js'></script>
|
||||
<script src="/js/script.js"></script>
|
|
@ -40,5 +40,5 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script async defer src='https://www.hCaptcha.com/1/api.js'></script>
|
||||
<script async defer src='https://hCaptcha.com/1/api.js'></script>
|
||||
<script src="/js/script.js"></script>
|
|
@ -19,5 +19,5 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script src='https://www.hCaptcha.com/1/api.js' async defer></script>
|
||||
<script src='https://hCaptcha.com/1/api.js' async defer></script>
|
||||
<script src="/js/script.js"></script>
|
|
@ -25,5 +25,5 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script async defer src='https://www.hCaptcha.com/1/api.js'></script>
|
||||
<script async defer src='https://hCaptcha.com/1/api.js'></script>
|
||||
<script src="/js/script.js"></script>
|
|
@ -9,7 +9,7 @@
|
|||
<body>
|
||||
<jl-header data-title="Impressum"></jl-header>
|
||||
<div id="content">
|
||||
<script async defer src='https://www.hCaptcha.com/1/api.js'></script>
|
||||
<script async defer src='https://hCaptcha.com/1/api.js'></script>
|
||||
<h2>Impressum</h2>
|
||||
<p>
|
||||
Jonas Leder<br>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script src='https://www.hCaptcha.com/1/api.js' async defer></script>
|
||||
<script src='https://hCaptcha.com/1/api.js' async defer></script>
|
||||
<script src="/js/script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script src='https://www.hCaptcha.com/1/api.js' async defer></script>
|
||||
<script src='https://hCaptcha.com/1/api.js' async defer></script>
|
||||
<script src="/js/script.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -40,7 +40,7 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script src='https://www.hCaptcha.com/1/api.js' async defer></script>
|
||||
<script src='https://hCaptcha.com/1/api.js' async defer></script>
|
||||
<script src="/js/script.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -35,7 +35,7 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script src='https://www.hCaptcha.com/1/api.js' async defer></script>
|
||||
<script src='https://hCaptcha.com/1/api.js' async defer></script>
|
||||
<script src="/js/script.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -47,7 +47,7 @@
|
|||
</div>
|
||||
<jl-footer></jl-footer>
|
||||
|
||||
<script src='https://www.hCaptcha.com/1/api.js' async defer></script>
|
||||
<script src='https://hCaptcha.com/1/api.js' async defer></script>
|
||||
<script src="/js/script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue