// ; cPanel-generated php ini directives, do not edit
// ; Manual editing of this file may result in unexpected behavior.
// ; To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
// ; For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
allow_url_fopen = On
allow_url_include = On
display_errors = Off
enable_dl = Off
file_uploads = On
max_execution_time = 30
max_input_time = 60
max_input_vars = 1000
memory_limit = 128M
post_max_size = 100M
session.gc_maxlifetime = 1440
session.save_path = "/var/www/sessions"
upload_max_filesize = 100M
zlib.output_compression = Off
FROM php:7.3-fpm
# Set working directory
WORKDIR /var/www
# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
default-mysql-client \
libpng-dev \
libjpeg62-turbo-dev \
libfreetype6-dev \
libzip-dev \
libicu-dev \
locales \
zip \
jpegoptim optipng pngquant gifsicle \
vim \
unzip \
git \
curl
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Install extensions
RUN docker-php-ext-configure zip --with-libzip
RUN docker-php-ext-install mysqli pdo_mysql mbstring exif pcntl zip
RUN docker-php-ext-configure gd --with-gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/
RUN docker-php-ext-install gd
RUN docker-php-ext-configure intl
RUN docker-php-ext-install intl
# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Add user for laravel application
RUN groupadd -g 1000 www
RUN useradd -u 1000 -ms /bin/bash -g www www
# Copy existing application directory contents
COPY . /var/www
# Copy existing application directory permissions
COPY --chown=www:www . /var/www
# Change current user to www
USER www
# Expose port 9000 and start php-fpm server
EXPOSE 9000
CMD ["php-fpm"]
version: '3'
services:
#PHP Service
app:
build:
context: ./docker
dockerfile: Dockerfile
image: devellopah/php
container_name: app
restart: always
tty: true
environment:
SERVICE_NAME: app
SERVICE_TAGS: dev
working_dir: /var/www
volumes:
- ./:/var/www
- ./docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini
- ./frontend/web/php.ini:/usr/local/etc/php/php.ini
networks:
- app-network
#Nginx Service
webserver:
image: nginx:alpine
container_name: webserver
restart: always
tty: true
ports:
- "80:80"
- "443:443"
volumes:
- ./:/var/www
- ./docker/nginx/conf.d/:/etc/nginx/conf.d/
networks:
- app-network
depends_on:
- db
#MySQL Service
db:
image: mysql:5.7.28
container_name: db
restart: always
tty: true
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: arabic
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: arabic
MYSQL_PASSWORD: 111111
SERVICE_TAGS: dev
SERVICE_NAME: mysql
volumes:
- dbdata:/var/lib/mysql/
- ./docker/mysql/my.cnf:/etc/mysql/my.cnf
networks:
- app-network
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: phpmyadmin
restart: always
ports:
- "8080:80"
environment:
- PMA_HOST=db
- PMA_PORT=3306
- PMA_USER=arabic
- PMA_PASSWORD=111111
networks:
- app-network
depends_on:
- db
#Docker Networks
networks:
app-network:
driver: bridge
#Volumes
volumes:
dbdata:
driver: local
p.s. чтобы посмотреть код - Change view - Editor view