Skip to content
This repository was archived by the owner on Jul 26, 2022. It is now read-only.

Commit 221055e

Browse files
committed
fix(docker): adjusted the docker file
1 parent aa8ee92 commit 221055e

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

Dockerfile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
FROM php:8.0-apache
22

3-
COPY . usr/webinterface/
4-
WORKDIR usr/webinterface/
3+
ENV APACHE_DOCUMENT_ROOT /var/www/html/public
54

5+
COPY . /var/www/html/
6+
WORKDIR /var/www/html/
7+
8+
# Building the application
69
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
10+
RUN apt-get update && apt-get install -y git
711
RUN composer install --no-dev
812

9-
USER www-data
13+
# Enabling ae2 rewrites
14+
RUN a2enmod rewrite
1015

11-
EXPOSE 80 443
12-
CMD ["apachectl", "-D", "FOREGROUND"]
16+
# Change document root
17+
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
18+
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf

0 commit comments

Comments
 (0)