Added Docker
This commit is contained in:
17
Dockerfile
Normal file
17
Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user