54 lines
No EOL
1.9 KiB
Docker
54 lines
No EOL
1.9 KiB
Docker
# Bootstrap SCSS
|
|
FROM ruby:latest AS build-scss
|
|
WORKDIR /build
|
|
COPY . /build
|
|
RUN mkdir /build/public/css
|
|
RUN gem install sass
|
|
RUN sass --update scss:public/css --style compressed
|
|
|
|
|
|
# Prepare Webserver
|
|
ARG INSTALL_CRON=0
|
|
ARG INSTALL_COMPOSER=0
|
|
ARG PHP_VERSION
|
|
ARG GLOBAL_VERSION
|
|
FROM thecodingmachine/php:8.0-v4-slim-apache
|
|
|
|
# |--------------------------------------------------------------------------
|
|
# | Main PHP extensions
|
|
# |--------------------------------------------------------------------------
|
|
# |
|
|
# | Installs the main PHP extensions
|
|
# |
|
|
|
|
USER root
|
|
RUN cd /usr/local/lib/thecodingmachine-php/extensions/current/ && ./install_all.sh && ./disable_all.sh
|
|
USER docker
|
|
|
|
# |--------------------------------------------------------------------------
|
|
# | Default PHP extensions to be enabled (in addition to the one declared in Slim build)
|
|
# |--------------------------------------------------------------------------
|
|
ENV PHP_EXTENSION_APCU=0 \
|
|
PHP_EXTENSION_MYSQLI=1 \
|
|
PHP_EXTENSION_PDO_MYSQL=0 \
|
|
PHP_EXTENSION_IGBINARY=0 \
|
|
PHP_EXTENSION_REDIS=0 \
|
|
PHP_EXTENSION_SOAP=0
|
|
|
|
# |--------------------------------------------------------------------------
|
|
# | Enable production config files
|
|
# |--------------------------------------------------------------------------
|
|
ENV APP_ENV=prod \
|
|
TEMPLATE_PHP_INI=production \
|
|
PHP_INI_ERROR_REPORTING=0
|
|
|
|
# |--------------------------------------------------------------------------
|
|
# | Run Apache as www-data for more security
|
|
# |--------------------------------------------------------------------------
|
|
ENV APACHE_RUN_USER=www-data \
|
|
APACHE_RUN_GROUP=www-data \
|
|
APACHE_EXTENSIONS=headers
|
|
# |--------------------------------------------------------------------------
|
|
# | Add php files of website
|
|
# |--------------------------------------------------------------------------
|
|
COPY --from=build-scss /build/public /var/www/html |