add initial Dockerfile

master
lub 5 years ago
parent b0e9ec65a0
commit 87235b0083

@ -0,0 +1,21 @@
FROM docker.io/composer:latest AS composer
COPY composer.json composer.lock ./
RUN composer install
FROM docker.io/php:apache
# copy apache configs
RUN rm /etc/apache2/sites-enabled/* \
&& a2enmod rewrite
COPY docker/ports.conf /etc/apache2/ports.conf
COPY docker/site.conf /etc/apache2/sites-enabled/site.conf
# copy source files
COPY --from=composer /app/vendor ./vendor
COPY src ./src
USER nobody:nogroup

@ -0,0 +1,2 @@
# if you change the port here, also change it in site.conf
Listen 9367

@ -0,0 +1,8 @@
# if you change the port here, also change it in ports.conf
<VirtualHost *:9367>
DocumentRoot /var/www/html/
# add a rewrite for /metrics
RewriteEngine On
RewriteRule "^/metrics$" "/var/www/html/src/metrics.php"
</VirtualHost>
Loading…
Cancel
Save