Skip to content
Snippets Groups Projects
Commit 020af665 authored by D4rkHeart's avatar D4rkHeart
Browse files

[Feat] Dockerfile-api set-up

- Update deprecated terms
- Update apache-php image from 7.3 to 8.2
- Fix Apache request header limit
parent 614e56ca
No related branches found
No related tags found
1 merge request!6[Feat] Docker configuration
#FROM php:7.3-stretch
FROM php:7.3-apache
FROM php:8.2-apache
RUN apt-get update; apt-get install -yq git vim zip;
RUN curl -sS https://getcomposer.org/installer | php
......@@ -11,6 +10,7 @@ RUN a2enmod rewrite
ENV APACHE_DOCUMENT_ROOT /var/www/html/public
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN echo "LimitRequestFieldSize 81920" > /etc/apache2/conf-enabled/say-yes-to-bearer-tokens.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
# XDEBUG
......@@ -19,13 +19,9 @@ RUN docker-php-ext-enable xdebug
# Enable Remote xdebug
RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini
RUN echo "xdebug.default_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini
RUN echo "xdebug.client_port=9000" >> /usr/local/etc/php/conf.d/xdebug.ini
RUN echo "xdebug.discover_client_host=on" >> /usr/local/etc/php/conf.d/xdebug.ini
# RUN chmod 777 -R /var/www/html/storage
# RUN apt-get install nodejs -y; apt-get install npm -y;
# RUN useradd -u 1000 containerUser
# RUN usermod -a -G root containerUser
\ No newline at end of file
RUN echo "xdebug.log=/proc/self/fd/1" >> /usr/local/etc/php/conf.d/xdebug.ini
RUN echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/xdebug.ini
RUN echo "xdebug.client_port=9003" >> /usr/local/etc/php/conf.d/xdebug.ini
# https://github.com/docker/for-win/issues/12673 says host.docker.internal does not work (and we cannot trust the guessing mechanism, because
# we are going through Traefik):
RUN echo "xdebug.client_host=172.22.0.1" >> /usr/local/etc/php/conf.d/xdebug.ini
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment