mirror of
https://github.com/anthonyaxenov/iptv.git
synced 2024-11-21 04:54:49 +00:00
Compose для дев/прод окружений
This commit is contained in:
parent
f0cfe4eda7
commit
2d5b9be5a0
1
.env.example
Normal file
1
.env.example
Normal file
@ -0,0 +1 @@
|
||||
IPTV_ENV=dev
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -4,8 +4,7 @@ downloaded/
|
||||
/src/commit
|
||||
/src/cache/*
|
||||
/src/vendor
|
||||
/src/views/custom/*
|
||||
!/src/views/custom/custom.twig.example
|
||||
/src/views/custom.twig
|
||||
*.log
|
||||
.env
|
||||
*.m3u
|
||||
|
@ -1,5 +1,3 @@
|
||||
version: '3'
|
||||
|
||||
networks:
|
||||
iptv:
|
||||
driver: bridge
|
||||
@ -8,14 +6,19 @@ services:
|
||||
|
||||
php:
|
||||
container_name: iptv-php
|
||||
build: 'docker/php'
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- PHP_IDE_CONFIG=serverName=iptv.local
|
||||
build:
|
||||
dockerfile: docker/php/${IPTV_ENV}.dockerfile
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- iptv
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ./docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
|
||||
- ./docker/php/php.ini:/usr/local/etc/php/conf.d/php.ini:ro
|
||||
- ./docker/php/${IPTV_ENV}.php.ini:/usr/local/etc/php/conf.d/php.ini:ro
|
||||
- ./log/php:/var/log/php:rw
|
||||
- ./src:/var/www:rw
|
||||
- ./playlists.ini:/var/www/config/playlists.ini:ro
|
||||
|
@ -1,16 +1,17 @@
|
||||
FROM php:8.1-fpm
|
||||
FROM php:8.2-fpm
|
||||
|
||||
RUN apt update && \
|
||||
apt upgrade -y && \
|
||||
apt install -y git && \
|
||||
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
apt install -y git unzip 7zip
|
||||
|
||||
# https://pecl.php.net/package/xdebug
|
||||
RUN pecl channel-update pecl.php.net && \
|
||||
pecl install xdebug-3.1.5 && \
|
||||
pecl install xdebug-3.3.2 unzip && \
|
||||
mkdir -p /var/log/php
|
||||
|
||||
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
|
||||
|
||||
EXPOSE 9000
|
||||
WORKDIR /var/www
|
||||
CMD composer install
|
||||
CMD php-fpm
|
||||
ENTRYPOINT php-fpm
|
@ -15,18 +15,10 @@ opcache.jit = tracing
|
||||
|
||||
[xdebug]
|
||||
; https://xdebug.org/docs/all_settings
|
||||
|
||||
; закомментировать для выключения
|
||||
zend_extension = xdebug.so
|
||||
|
||||
; для отладки установить значение 'develop,debug'
|
||||
xdebug.mode = develop
|
||||
|
||||
; для отладки при каждом запросе поменять 'trigger' на 'yes'
|
||||
; иначе -- отправлять заголовок 'Cookie: XDEBUG_TRIGGER=go'
|
||||
xdebug.start_with_request = trigger
|
||||
xdebug.mode = debug
|
||||
xdebug.start_with_request = yes
|
||||
xdebug.trigger_value = go
|
||||
|
||||
xdebug.client_host = 172.17.0.1
|
||||
xdebug.REQUEST = *
|
||||
xdebug.SESSION = *
|
12
docker/php/prod.dockerfile
Normal file
12
docker/php/prod.dockerfile
Normal file
@ -0,0 +1,12 @@
|
||||
FROM php:8.2-fpm
|
||||
|
||||
RUN apt update && \
|
||||
apt upgrade -y && \
|
||||
apt install -y git
|
||||
|
||||
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
|
||||
|
||||
EXPOSE 9000
|
||||
WORKDIR /var/www
|
||||
CMD composer install
|
||||
ENTRYPOINT php-fpm
|
14
docker/php/prod.php.ini
Normal file
14
docker/php/prod.php.ini
Normal file
@ -0,0 +1,14 @@
|
||||
[PHP]
|
||||
error_reporting = E_ALL
|
||||
file_uploads = Off
|
||||
; upload_max_filesize=10M
|
||||
; post_max_size=10M
|
||||
|
||||
[opcache]
|
||||
opcache.enable = 1
|
||||
opcache.enable_cli = 1
|
||||
opcache.memory_consumption = 128
|
||||
opcache.max_accelerated_files = 30000
|
||||
opcache.revalidate_freq = 0
|
||||
opcache.jit_buffer_size = 64M
|
||||
opcache.jit = tracing
|
Loading…
Reference in New Issue
Block a user