Add files for production
This commit is contained in:
50
Dockerfile
Normal file
50
Dockerfile
Normal file
@ -0,0 +1,50 @@
|
||||
FROM php:8.2-apache
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
libzip-dev \
|
||||
unzip \
|
||||
libonig-dev \
|
||||
libxml2-dev \
|
||||
libpng-dev \
|
||||
libjpeg-dev \
|
||||
libicu-dev \
|
||||
sqlite3 \
|
||||
curl \
|
||||
git \
|
||||
nano
|
||||
|
||||
RUN docker-php-ext-configure gd --with-jpeg && \
|
||||
docker-php-ext-configure zip && \
|
||||
docker-php-ext-install \
|
||||
pdo_sqlite \
|
||||
zip \
|
||||
mbstring \
|
||||
exif \
|
||||
pcntl \
|
||||
bcmath \
|
||||
xml \
|
||||
intl
|
||||
|
||||
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
|
||||
php composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
|
||||
php -r "unlink('composer-setup.php');"
|
||||
|
||||
RUN curl -sS https://get.symfony.com/cli/installer | bash && \
|
||||
mv /root/.symfony5/bin/symfony /usr/local/bin/symfony
|
||||
|
||||
COPY 000-default.conf /etc/apache2/sites-available/
|
||||
|
||||
COPY composer.lock composer.json ./
|
||||
|
||||
RUN composer install --no-scripts --no-dev --optimize-autoloader
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN bash install.sh
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["apache2-foreground"]
|
Reference in New Issue
Block a user