1
0

Added Docker

This commit is contained in:
2025-04-01 16:25:40 +02:00
parent 97377d2c11
commit 3376284ac4
6 changed files with 44 additions and 1 deletions

17
Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
FROM composer:latest AS build
WORKDIR /var/www/freezer-web-app
COPY . .
RUN ["composer", "install", "--optimize-autoloader", "--no-dev"]
RUN ["php", "artisan", "optimize"]
FROM php:8.4-apache
WORKDIR /var/www/freezer-web-app
ENV APACHE_DOCUMENT_ROOT=/var/www/freezer-web-app/public
COPY --from=build /var/www/freezer-web-app .
COPY ./configuring.sh /configuring.sh
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
RUN ["a2enmod", "rewrite"]
RUN ["chown", "-R", "www-data", "."]
RUN ["chmod", "+x", "/configuring.sh"]